ImageGear Professional DLL v17.1 for Windows Accusoft
IG_palette_entry_set
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_set

Glossary Item Box

This function sets a single palette entry in image hIGear's DIB palette.

Declaration:

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

Arguments:

hIGear HIGEAR handle of image.
lpRGBEntry Far pointer to an AT_RGB struct containing the three color values to be set into the palette entry. Note that this is not an AT_RGBQUAD struct. Also note that the order is Blue, Green, Red in an AT_RGB struct.
nIndex Which palette entry to set, 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:

None

Example:

  Copy Code
HIGEAR hIGear;              /* HIGEAR handle of image  */
AT_RGB rgbPaletteColor;     /* Will hold returned color */
AT_ERRCOUNT      Errcount;         /* Returned count of errors onstack */
/* Set palette entry 255 to a medium-bright yellow, intensity 175:  */
rgbPaletteColor.b = 0;     /* There's no blue in yellow */
rgbPaletteColor.r  =  rgbPaletteColor.g  =  175;
nErrcount = IG_palette_entry_set ( hIGear, &rgbPaletteColor, 255 );
©2012. Accusoft Corporation. All Rights Reserved.