ImageGear for C and C++ on Linux v18.8 - Updated
IG_util_colorspace_value_to_ids
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Utility Functions > IG_util_colorspace_value_to_ids

This function maps from legacy ImageGear color space ID (enumColorSpaces) to current ImageGear color space ID (enumIGColorSpaceIDs).

Declaration:

 
Copy Code
enumIGColorSpaceIDs ACCUAPI IG_util_colorspace_value_to_ids(
        enumColorSpaces colorSpace
);

Arguments:

Name Type Description
colorSpace enumColorSpaces Legacy ImageGear color space ID.

Return Value:

The current ImageGear color space ID that corresponds with the given legacy ImageGear color space ID.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
enumColorSpaces oldCS;  /* Old color space ID */
enumIGColorSpaceIDs cs; /* New color space ID */
oldCS = IG_COLOR_SPACE_CMYK;
cs = IG_util_colorspace_value_to_ids(oldCS);
/* cs is now IG_COLOR_SPACE_ID_CMYK */
oldCS = IG_COLOR_SPACE_RGBA;
cs = IG_util_colorspace_value_to_ids(oldCS);
/* cs is now IG_COLOR_SPACE_ID_RGBA */

Remarks:

This function exists because the newer color space IDs are different and can store more information. See accucnst.h for the definitions of these enumerations.