Read and write BMP images.
BMP IO | Read and write BMP images. |
Functions | |
gdImageBmpPtr | Outputs the given image as BMP data, but using a gdIOCtx instead of a file. |
gdImageBmp | gdImageBmp outputs the specified image to the specified file in BMP format. |
gdImageBmpCtx | Outputs the given image as BMP data, but using a gdIOCtx instead of a file. |
gdImageCreateFromBmp | |
gdImageCreateFromBmpPtr | |
gdImageCreateFromBmpCtx |
void * gdImageBmpPtr( gdImagePtr im, int * size, int compression )
Outputs the given image as BMP data, but using a gdIOCtx instead of a file. See gdImageBmp.
im | the image to save. |
size | Output: size in bytes of the result. |
compression | whether to apply RLE or not. |
A pointer to memory containing the image data or NULL on error.
void gdImageBmp( gdImagePtr im, FILE * outFile, int compression )
gdImageBmp outputs the specified image to the specified file in BMP format. The file must be open for writing. Under MSDOS and all versions of Windows, it is important to use “wb” as opposed to simply “w” as the mode when opening the file, and under Unix there is no penalty for doing so. gdImageBmp does not close the file; your code must do so.
In addition, gdImageBmp allows to specify whether RLE compression should be applied.
gdImageBmpCtx write via a gdIOCtx instead of a file handle.
gdImageBmpPtr store the image file to memory.
im | the image to save. |
outFile | the output FILE* object. |
compression | whether to apply RLE or not. |
nothing
void gdImageBmpCtx( gdImagePtr im, gdIOCtxPtr out, int compression )
Outputs the given image as BMP data, but using a gdIOCtx instead of a file. See gdImageBmp.
im | the image to save. |
out | the gdIOCtx to write to. |
compression | whether to apply RLE or not. |
Outputs the given image as BMP data, but using a gdIOCtx instead of a file.
void * gdImageBmpPtr( gdImagePtr im, int * size, int compression )
gdImageBmp outputs the specified image to the specified file in BMP format.
void gdImageBmp( gdImagePtr im, FILE * outFile, int compression )
Outputs the given image as BMP data, but using a gdIOCtx instead of a file.
void gdImageBmpCtx( gdImagePtr im, gdIOCtxPtr out, int compression )
gdImagePtr gdImageCreateFromBmp( FILE * inFile )
gdImagePtr gdImageCreateFromBmpPtr( int size, void * data )
gdImagePtr gdImageCreateFromBmpCtx( gdIOCtxPtr infile )