ImageGear Professional DLL v18.1 for Windows
IG_image_bits_per_channel_get
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > General Image Functions > IG_image_bits_per_channel_get

Glossary Item Box

This function gets the number of bits allocated for each pixel channel in an image: 8, 16, or 32.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_image_bits_per_channel_get(
        HIGEAR hIGear, 
        AT_INT* lpBitsPerChannel 
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image.
lpBitsPerChannel AT_INT* Returned number of allocated bits for each pixel channel.

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

Sample:

Pixel Access

Example:

  Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGEAR hImage;          /* Handle of image */
AT_INT nBits;           /* Number of bits per channel */
nErrcount = IG_image_bits_per_channel_get(hImage, &nBits);

Remarks:

This is not the same as the bit depth of a channel. The number of bits used for a pixel channel may be less than the number of bits allocated.
©2014. Accusoft Corporation. All Rights Reserved.