ImageGear Professional DLL v17.1 for Windows Accusoft
IG_DIB_channel_depth_get
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_channel_depth_get

Glossary Item Box

This function returns the bit depth of the channel specified by the Index parameter.

Declaration:

  Copy Code
AT_INT ACCUAPI IG_DIB_channel_depth_get(
        HIGDIBINFO hDIB, 
        AT_INT Index
);

Arguments:

hDIB DIB info handle.
Index Index of channel of which to return bit depth.

Return Value:

Returns specified channel's bit depth.

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 depth;           /* Returned depth of first channel */
nErrcount = IG_image_DIB_info_get(hImage, &hDIBInfo);
depth = IG_DIB_channel_depth_get(hDIBInfo, 0);

Remarks:

For example, if you had a typical 24-bit RGB image with three 8-bit channels, you could specify 0, 1, or 2 for the index and the return value would be 8.

©2012. Accusoft Corporation. All Rights Reserved.