ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_legacy_bit_depth_get

This function returns the bit depth that earlier ImageGear versions used to store this image.


Copy Code
AT_ERRCOUNT ACCUAPI IG_DIB_legacy_bit_depth_get(
        HIGEAR hIGear, 
        LPAT_INT lpBitsPerPixel 


Name Type Description
hIGear HIGEAR HIGEAR handle of image.
lpBitsPerPixel LPAT_INT Returned legacy bit depth of the image.

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 for C and C++.


Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGEAR hImage;          /* Handle of image */
AT_INT bpp;             /* Image bit depth */
nErrcount = IG_DIB_legacy_bit_depth_get(hImage, &bpp);
/* bpp could be 1, 4, 8, 9-16, 24, or 32 */


This function can be used for working with pixel access functions in the legacy mode.

Is this page helpful?
Yes No
Thanks for your feedback.