IM: imImage Storage

IM - An Imaging Tool

imImage Storage
[Image Storage]


Detailed Description

Functions to simplify the process of reading and writting imImage structures. Will also load and save the alpha planes when possible.
See im_image.h


Functions

imImageimFileLoadImage (imFile *ifile, int index, int *error)
void imFileLoadImageFrame (imFile *ifile, int index, imImage *image, int *error)
imImageimFileLoadBitmap (imFile *ifile, int index, int *error)
void imFileLoadBitmapFrame (imFile *ifile, int index, imImage *image, int *error)
int imFileSaveImage (imFile *ifile, const imImage *image)
imImageimFileImageLoad (const char *file_name, int index, int *error)
imImageimFileImageLoadBitmap (const char *file_name, int index, int *error)
int imFileImageSave (const char *file_name, const char *format, const imImage *image)

Function Documentation

imImage* imFileLoadImage imFile ifile,
int  index,
int *  error
 

Loads an image from an already open file. Returns NULL if failed.
This will call imFileReadImageInfo and imFileReadImageData.
index specifies the image number between 0 and image_count-1.
The returned image will be of the same color_space and data_type of the image in the file.
See also imErrorCodes.

ifile:ImageLoad([index: number]) -> image: imImage, error: number [in Lua 5] 
Default index is 0.

void imFileLoadImageFrame imFile ifile,
int  index,
imImage image,
int *  error
 

Loads an image from an already open file. Returns NULL if failed.
This function assumes that the image in the file has the same parameters as the given image.
This will call imFileReadImageInfo and imFileReadImageData.
index specifies the image number between 0 and image_count-1.
The returned image will be of the same color_space and data_type of the image in the file.
See also imErrorCodes.

ifile:ImageLoadFrame(index: number, image: imImage) -> error: number [in Lua 5] 
Default index is 0.

imImage* imFileLoadBitmap imFile ifile,
int  index,
int *  error
 

Loads an image from an already open file, but forces the image to be a bitmap.
The returned imagem will be always a Bitmap image, with color_space RGB, MAP, GRAY or BINARY, and data_type IM_BYTE.
index specifies the image number between 0 and image_count-1.
Returns NULL if failed. See also imErrorCodes.

ifile:LoadBitmap([index: number]) -> image: imImage, error: number [in Lua 5] 
Default index is 0.

void imFileLoadBitmapFrame imFile ifile,
int  index,
imImage image,
int *  error
 

Loads an image from an already open file, but forces the image to be a bitmap.
This function assumes that the image in the file has the same parameters as the given image.
The imagem must be a Bitmap image, with color_space RGB, MAP, GRAY or BINARY, and data_type IM_BYTE.
index specifies the image number between 0 and image_count-1.
Returns NULL if failed. See also imErrorCodes.

ifile:LoadBitmapFrame(index: number, image: imImage) -> error: number [in Lua 5] 
Default index is 0.

int imFileSaveImage imFile ifile,
const imImage image
 

Saves the image to an already open file.
This will call imFileWriteImageInfo and imFileWriteImageData.
Returns error code.

ifile:SaveImage(image: imImage) -> error: number [in Lua 5] 

imImage* imFileImageLoad const char *  file_name,
int  index,
int *  error
 

Loads an image from file. Open, loads and closes the file.
index specifies the image number between 0 and image_count-1.
Returns NULL if failed. See also imErrorCodes.

im.FileImageLoad(file_name: string, [index: number]) -> image: imImage, error: number [in Lua 5] 
Default index is 0.

imImage* imFileImageLoadBitmap const char *  file_name,
int  index,
int *  error
 

Loads an image from file, but forces the image to be a bitmap. Open, loads and closes the file.
index specifies the image number between 0 and image_count-1.
Returns NULL if failed. See also imErrorCodes.

im.FileImageLoadBitmap(file_name: string, [index: number]) -> image: imImage, error: number [in Lua 5] 
Default index is 0.

int imFileImageSave const char *  file_name,
const char *  format,
const imImage image
 

Saves the image to file. Open, saves and closes the file.
Returns error code.

im.FileImageSave(file_name: string, format: string, image: imImage) -> error: number [in Lua 5] 
image:Save(file_name: string, format: string) -> error: number [in Lua 5]