ImageGear Professional DLL v18.1 for Windows
IG_DIB_bit_depth_get
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_bit_depth_get

Glossary Item Box

This function returns the bit depth of an image, which is the sum of the channel bit depths.

Declaration:

  Copy Code
AT_INT ACCUAPI IG_DIB_bit_depth_get(
        HIGDIBINFO hDIB
);

Arguments:

Name Type Description
hDIB HIGDIBINFO DIB info handle.

Return Value:

Returns image bit depth.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

Annotation, Load Callback, Thumbnail, MFC PDF Demo

Example:

  Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGDIBINFO hDIBInfo;    /* DIB info handle */
HIGEAR hImage;          /* HIGEAR handle of image */
AT_INT imageDepth;      /* Returned bit depth of image */
nErrcount = IG_image_DIB_info_get(hImage, &hDIBInfo);
imageDepth = IG_DIB_bit_depth_get(hDIBInfo);

Remarks:

For example, if the image is a simple 24-bit RGB image, this function will return 24. If it's a 24-bit RGB image with an 8-bit alpha channel, this function will return 32.

©2014. Accusoft Corporation. All Rights Reserved.