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

This function sets new value of color profile associated with color space given by nColorSpace parameter to profile group given by nProfileGroup parameter.

Declaration:

 
Copy Code
AT_ERRCODE LACCUAPI IG_cpm_profile_set(
        AT_MODE nColorSpace, 
        DWORD nProfileGroup
        LPAT_BYTE lpRawData, 
        DWORD dwRawSize, 
        AT_BOOL bConvert 
);

Arguments:

Name Type Description
nColorSpace AT_MODE IN: color space ID which profile to replace. Current supported values: IG_COLOR_SPACE_RGBIG_COLOR_SPACE_CMYK.
nProfileGroup DWORD IN: color profile group where to set profile. Possible values: IG_CP_GRP_WORKINGIG_CP_GRP_IMPORTIG_CP_GRP_EXPORTIG_CP_GRP_DISPLAY.
lpRawData LPAT_BYTE IN: raw data of new profile. Can be either NULL or pointer to memory buffer that contains valid color profile in format specified by ICC.1:1998-09.
dwRawSize DWORD IN: length of data stored in lpRawData.
bConvert AT_BOOL IN: if TRUE then this function converts all images associated with old profile to new profile, but if FALSE it simply replaces profile without any conversion.

Return Value:

Return value is a code of last error or 0 if success.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

Color

Remarks:

If the last parameter is set to TRUE, then all associated images with previous format are converted to new color profile. In the case that nColorSpace does not match the same color space that is used in color profile or color profile is in invalid or unsupported format, then error is returned.

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

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