ImageGear Professional DLL v17.1 for Windows Accusoft
IG_palette_entry_get
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Palette Functions > IG_palette_entry_get

Glossary Item Box

This function obtains from image hIGear's DIB palette, the palette entry indicated by nIndex.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_palette_entry_get (
        HIGEAR hIGear, 
        LPAT_RGB lpRGBEntry, 
        UINT nIndex 
);

Arguments:

hIGear HIGEAR handle of image.
lpRGBEntry Far pointer to an AT_RGB struct to receive the three color values of the palette entry. (Note that this is not an AT_RGBQUAD struct. Also note that the order of the bytes is Blue, Green, Red in an AT_RGB struct.)
nIndex Which palette entry to get, 0 to 255.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

Indexed RGB - 1…8 bpp.

Sample:

Image Processing, Pixel Access

Example:

  Copy Code
HIGEAR hIGear;           /* HIGEAR handle of image    */
AT_RGB rgbPaletteColor;  /* Will hold returned color   */
AT_ERRCOUNT nErrcount;        /* Returned count of errors on stack*/
/* Get palette entry 255: */
nErrcount = IG_palette_entry_get ( hIGear, rgbPaletteColor, 255 );
©2012. Accusoft Corporation. All Rights Reserved.