This function returns the number of channels in the image.
Declaration:
Copy Code | |
---|---|
AT_INT ACCUAPI IG_DIB_channel_count_get( HIGDIBINFO hDIB ); |
Arguments:
hDIB | DIB info handle. |
Return Value:
Returns the number of channels in the image.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
None
Example:
Copy Code | |
---|---|
AT_ERRCOUNT nErrcount; /* Number of errors on stack */ HIGDIBINFO hDIBInfo; /* DIB info handle */ HIGEAR hImage; /* HIGEAR handle of image */ AT_INT nChannels; /* Returned number of channels */ nErrcount = IG_image_DIB_info_get(hImage, &hDIBInfo); nChannels = IG_DIB_channel_count_get(hDIBInfo); |
Remarks:
For example, a typical 24-bit RGB image has three 8-bit channels (red, green, blue) so this function will return 3. For a 24-bit RGB image with a single alpha channel, this function would return 4.