ImageGear for C and C++ on Windows v20.3 - Updated
IG_cpm_image_profile_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Color Profile Management Functions > IG_cpm_image_profile_get

This function returns information about color profile associated with given image.

Declaration:

 
Copy Code
AT_ERRCODE LACCUAPI IG_cpm_image_profile_get(
        HIGEAR hIGear, 
        LPAT_BOOL lpbIsLocal, 
        LPAT_MODE lpnColorSpace, 
        LPCHAR lpStatusStr, 
        UINT nStatusSize 
        LPUINT lpnStatusLen, 
        LPDWORD lpnProfileSize 
        LPBYTE lpProfileData, 
        DWORD dwProfileDataSize 
);

Arguments:

Name Type Description
hIGear HIGEAR IN: handle of image where to set profile.
lpbIsLocal LPAT_BOOL OUT: return TRUE if local profile associated with given image and FALSE in other case. If NULL then argument ignored.
lpnColorSpace LPAT_MODE OUT: color space id of returned profile. Possible returned values: IG_COLOR_SPACE_RGBIG_COLOR_SPACE_CMYK. If NULL then parameter ignored.
lpStatusStr LPCHAR OUT: pointer where to copy textual information about local profile. If NULL then parameter ignored.
nStatusSize UINT IN: size of lpStatusStr buffer.
lpnStatusLen LPUINT OUT: Return length of actual status message. If NULL then parameter ignored.
lpnProfileSize LPDWORD OUT: If not NULL then returns actual profile size in ICC format.
lpProfileData LPBYTE OUT: Pointer where to put profile data. Profile will be written according to ICC.1:1998-09 specification.
dwProfileDataSize DWORD IN: the size of lpProfileData buffer.

Return Value:

Return value is the code of the last error, or NULL if success.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

None

Remarks:

The second parameter is used to get information either this image has embedded local profile or use global profile.

The rest of parameters are used to provide text description of profile and profile data itself. The profile returned through lpProfileData will be written according to ICC specification.

Depending from parameters it either return information about profile or profile data itself. For example, if lpnProfileSize is not NULL then the size of profile is calculated and returned. If lpProfileData is not NULL then profile is encoded into standard ICC format and returned through this parameter.

Please note that color profile management is disabled by default. See Working with ImageGear Color Profile Manager for a description of how to activate it.

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