ImageGear for C and C++ on Windows v19.10 - Updated
IG_DIB_legacy_bit_depth_get
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.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_DIB_legacy_bit_depth_get(
        HIGEAR hIGear, 
        LPAT_INT lpBitsPerPixel 
);

Arguments:

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++.

Sample:

Pixel Access

Example:

 
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 */

Remarks:

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