ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Load Functions > IG_load_mem_CB

This function loads an image from a memory buffer using user-defined callback functions.


Copy Code
   LPVOID lpImage,
   AT_UINT nSize,
   UINT nPage,
   UINT nTile,
   LPFNIG_RASTER_SET lpfnRasterSet,
   LPVOID lpPrivateData


Name Type Description
lpImage LPVOID Pointer to a memory buffer containing the image.
nSize AT_UINT Size of image in memory.
nPage UINT Page number to load if this is a multi-page file. Note that page numbers begin at 1, not 0. Set nPage to 1 if this is not a multi-page file.
nTile UINT If loading an image that is tiled, you can set the number of a specific tile to load. Set to 1 for a non-tiled image.
lpfnRasterSet LPFNIG_RASTER_SET Pointer to callback function to be called after each raster line is read.
lpfnDIBCreate LPFNIG_DIB_CREATE Pointer to callback function to be called after the file header has been read.
lpPrivateData LPVOID Pointer to a private data area. This pointer will be passed to the callback functions.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

Actual set of pixel formats supported by this function can be narrower, depending on the implementation of the user-defined callback functions.


This function is only kept for backward compatibility reasons. Please use IG_load_mem_CB_ex instead.

See the description under function IG_load_FD_CB. See also function IG_load_mem.

If you set nPage to < 1, ImageGear will default the value to 1; if you set nPage to greater than the number of pages in the document, ImageGear will default the value to the last page number. This same default procedure applies to the nTile parameter as well.

Is this page helpful?
Yes No
Thanks for your feedback.