ImageGear Professional v18.2 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_channel_depths_get |
This function copies channel bit depths to an array.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_DIB_channel_depths_get( HIGDIBINFO hDIB, AT_INT ChannelCount, AT_INT* lpChannelDepths ); |
Name | Type | Description |
hDIB | HIGDIBINFO | DIB info handle. |
ChannelCount | AT_INT | Number of channels for which to return depths. |
lpChannelDepths | AT_INT* | Array to which to copy channel depths. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
All pixel formats supported by ImageGear Professional.
None
Copy Code
|
|
---|---|
AT_ERRCOUNT nErrcount; /* Number of errors on stack */ HIGDIBINFO hDIBInfo; /* DIB info handle */ HIGEAR hImage; /* HIGEAR handle of image */ AT_INT nChannels; /* Number of channels in image */ LPAT_INT depths; /* Array of channel depths */ nErrcount = IG_image_DIB_info_get(hImage, &hDIBInfo); nChannels = IG_DIB_channel_count_get(hDIBInfo); depths = (LPAT_INT) malloc(nChannels * sizeof(AT_INT)); nErrcount = IG_DIB_channel_depths_get(hDIBInfo, nChannels, depths); |
You can use this function to find out the bit depths of each individual channel.