This function gets an image's color space ID.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_image_colorspace_get( HIGEAR hIGear, enumIGColorSpaceIDs *lpColorspace ); |
Arguments:
hIGear | HIGEAR handle of image. |
lpColorspace | Returned color space of the image. See enumIGColorSpaceIDs. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
Pixel Access
Example:
Copy Code | |
---|---|
AT_ERRCOUNT nErrcount; /* Number of errors on stack */ HIGEAR hImage; /* Handle of image */ enumIGColorSpaceIDs cs; /* Color space ID */ AT_BOOL bIndexed; /* Is the image indexed? */ nErrcount = IG_image_colorspace_get(hImage, &cs); if ((cs & IG_COLOR_SPACE_ID_ColorMask) == IG_COLOR_SPACE_ID_I) bIndexed = TRUE; else bIndexed = FALSE; |
Remarks:
An ImageGear color space ID is actually a combination of values. It contains information about 1) color channels, 2) an alpha channel, and 3) extra channels. Examine the definition of enumIGColorSpaceIDs carefully (in accucnst.h) and use bitmasks such as IG_COLOR_SPACE_ID_ColorMask to isolate the information you want. |