ImageGear for C and C++ on Windows v19.10 - Updated
IG_fltr_raster_plane_callback_set
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_raster_plane_callback_set

This function allows you to register your raster plane callback LPFNIG_RASTER_PLANE_SET function.

Declaration:

 
Copy Code
AT_ERRCOUNT LACCUAPI IG_fltr_raster_plane_callback_set(
   LPFNIG_RASTER_PLANE_SET lpfnRasterPlaneSetCB,
   AT_VOID* Reserved
);

Arguments:

Name Type Description
lpfnRasterPlaneSetCB LPFNIG_RASTER_PLANE_SET Specifies the callback function which will receive raster planes of pixels.
Reserved AT_VOID* Reserved, should be NULL.

Return Value:

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

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

LoadCB

Example:

 
Copy Code
// Handles merging of planes into a raster line
AT_ERRCOUNT ACCUAPI RasterPlaneSet( 
    AT_VOID               *lpPrivate,        // Private data passed in
    const AT_VOID*     lpRast,                // Raster line to set
    AT_PIXPOS            cyPos,            // Y position in the image
    AT_INT               cRasterSize,        // Size of the raster line
    AT_INT                nBitPlane        // Bit plane to merge in
    )
{
    // ...
    return 0;
}

void Example_IG_fltr_raster_plane_callback_set()
{
    AT_ERRCOUNT nErrcount;            // Count of returned errors on stack
    // Set raster plane callback functions
    nErrcount = IG_fltr_raster_plane_callback_set(RasterPlaneSet, NULL);
}

Remarks:

ImageGear calls lpfnRasterPlaneSetCB callback function to pass raster plane data that has been read from a file to the application. The callback is invoked when reading images where pixel data is stored in planar format. As of this writing, only TIF and DICOM format filters support this callback.