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

Glossary Item Box

This function returns the number of channels that are available to store values in the given pixel object.

Declaration:

  Copy Code
AT_INT ACCUAPI IG_pixel_channel_count_get(HIGPIXEL hPixel );

Arguments:

Name Type Description
hPixel HIGPIXEL Handle of pixel object.

Return Value:

Number of channels in pixel object.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

None

Example:

  Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGEAR hImage;          /* Handle of image */
HIGPIXEL hPix;          /* Handle of pixel */
AT_DEPTH nChannels;     /* Number of channels */
nErrcount = IG_load_file("test.jpg", &hImage);
nErrcount = IG_DIB_pix_get(hImage, 0, 0, &hPix);
nChannels = IG_pixel_channel_count_get(hPix);
IG_pixel_delete(hPix);
IG_image_delete(hImage);
©2014. Accusoft Corporation. All Rights Reserved.