ImageGear for C and C++ on Windows v20.5 - Updated
IG_util_colorspace_color_count_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Utility Functions > IG_util_colorspace_color_count_get

This function returns the number of color channels in the specified color space.

Declaration:

 
Copy Code
AT_UINT ACCUAPI IG_util_colorspace_color_count_get(
        enumIGColorSpaceIDs colorSpace
);

Arguments:

Name Type Description
colorSpace enumIGColorSpaceIDs Color space ID.

Return Value:

The number of color channels.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

None

Example:

 
Copy Code
enumIGColorSpaceIDs colorSpace = IG_COLOR_SPACE_ID_RGBA;
AT_UINT nColor;         /* Number of color channels */
nColor = IG_util_colorspace_color_count_get(colorSpace);
/* nColor is 3 */

Remarks:

Color channels are all image channels except alpha and extra channels.

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