"Fossies" - the Fresh Open Source Software Archive

Member "libgd-2.3.2/docs/naturaldocs/html/files/gd_bmp-c.html" (5 Mar 2021, 22761 Bytes) of package /linux/www/libgd-2.3.2.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the project site itself.

BMP IO

Read and write BMP images.

Summary
BMP IORead and write BMP images.
Functions
gdImageBmpPtrOutputs the given image as BMP data, but using a gdIOCtx instead of a file.
gdImageBmpgdImageBmp outputs the specified image to the specified file in BMP format.
gdImageBmpCtxOutputs the given image as BMP data, but using a gdIOCtx instead of a file.
gdImageCreateFromBmp
gdImageCreateFromBmpPtr
gdImageCreateFromBmpCtx

Functions

gdImageBmpPtr

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.

Parameters

imthe image to save.
sizeOutput: size in bytes of the result.
compressionwhether to apply RLE or not.

Returns

A pointer to memory containing the image data or NULL on error.

gdImageBmp

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.

Variants

gdImageBmpCtx write via a gdIOCtx instead of a file handle.

gdImageBmpPtr store the image file to memory.

Parameters

imthe image to save.
outFilethe output FILE* object.
compressionwhether to apply RLE or not.

Returns

nothing

gdImageBmpCtx

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.

Parameters

imthe image to save.
outthe gdIOCtx to write to.
compressionwhether to apply RLE or not.

gdImageCreateFromBmp

gdImagePtr gdImageCreateFromBmp(FILE *inFile)

gdImageCreateFromBmpPtr

gdImagePtr gdImageCreateFromBmpPtr(int size,
void *data)

gdImageCreateFromBmpCtx

gdImagePtr gdImageCreateFromBmpCtx(gdIOCtxPtr infile)
void * gdImageBmpPtr(gdImagePtr im,
int *size,
int compression)
Outputs the given image as BMP data, but using a gdIOCtx instead of a file.
gdIOCtx structures hold function pointers for doing image IO.
void gdImageBmp(gdImagePtr im,
FILE *outFile,
int compression)
gdImageBmp outputs the specified image to the specified file in BMP format.
void gdImageBmpCtx(gdImagePtr im,
gdIOCtxPtr out,
int compression)
Outputs the given image as BMP data, but using a gdIOCtx instead of a file.
gdImagePtr gdImageCreateFromBmp(FILE *inFile)
gdImagePtr gdImageCreateFromBmpPtr(int size,
void *data)
gdImagePtr gdImageCreateFromBmpCtx(gdIOCtxPtr infile)
Close