ImageGear for C and C++ on Windows v20.3 - Updated
IG_dspl_palette_set
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_palette_set

This function sets the new palette options.

Declaration:

 
Copy Code
AT_ERRCOUNT  ACCUAPI  IG_dspl_palette_set(
        [IN] HIGEAR hIGear,
        [IN] DWORD dwGrpID,
        [IN] AT_MODE nPalMode,
        [IN] HPALETTE hPalette
);

Arguments:

Name Type Description
hIGear HIGEAR ImageGear handle of image.
dwGrpID DWORD Identifier of group in which to set palette options.
nPalMode AT_MODE New value of PaletteMode to set. Possible values are:
  • IG_DSPL_PALETTE_HIGH
  • IG_DSPL_PALETTE_LOW
  • IG_DSPL_PALETTE_DISABLE
hPalette HPALETTE New value of DevicePalette option. Possible value is NULL or valid OS-dependent palette handle. Please note that the application code is responsible for removing all the resources allocated for DevicePalette if it is not NULL.

Return Value:

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

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

Medical, MFC

Example:

 
Copy Code
HIGEAR            hIGear;    /* HIGEAR handle of image  */ 
DWORD           nGrpID;    /* display group identifier  */
 ...
/* disable palette realization */
IG_dspl_palette_set( hIGear, nGrpID, IG_DSPL_PALETTE_DISABLE, NULL );
 ...
Is this page helpful?
Yes No
Thanks for your feedback.