This function returns the bit depth of an image, which is the sum of the channel bit depths.
Copy Code
|
|
---|---|
AT_INT ACCUAPI IG_DIB_bit_depth_get( HIGDIBINFO hDIB ); |
Name | Type | Description |
---|---|---|
hDIB | HIGDIBINFO | DIB info handle. |
Returns image bit depth.
All pixel formats supported by ImageGear for C and C++.
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); |
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.