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

This function allows you to register your ICC callback functions.

Declaration:

 
Copy Code
AT_ERRCODE ACCUAPI IG_fltr_ICC_callback_set(
   LPVOID lpPrivate,
   LPAFT_IG_ICC_GET_CB lpfnGetCB,
   LPAFT_IG_ICC_SET_CB lpfnSetCB,
   LPAFT_ANY lpfnReserved
);

Arguments:

Name Type Description
lpPrivate LPVOID Private callback data.
lpfnGetCB LPAFT_IG_ICC_GET_CB GET callback function.
lpfnSetCB LPAFT_IG_ICC_SET_CB SET callback function.
lpfnReserved LPAFT_ANY Reserved.

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.

Example:

 
Copy Code
VOID ACCUAPI ICCGet(
   AT_VOID       *lpPrivate,        // Private callback data.
   AT_BYTE       *lpICCData,        // ICC profile data, allocated by the toolkit
   AT_INT         DataLength        // Length of ICC profile data, in bytes
)
{
    // ...
}

VOID ACCUAPI ICCSet(
   AT_VOID       *lpPrivate,        // Private callback data.
   AT_BYTE       **lplpICCData,        // ICC profile data, allocated by the application
   AT_INT        *lpDataLength        // Length of ICC profile data, in bytes
)
{
    // ...
}

void Example_IG_fltr_ICC_callback_set()
{
    AT_ERRCOUNT nErrcount;            // Count of returned errors on stack
    // Set ICC callback functions
    nErrcount = IG_fltr_ICC_callback_set(NULL, ICCGet, ICCSet, NULL);
}

Remarks:

This function registers callbacks for reading and writing ICC profiles during loading and saving of image files.

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