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

Glossary Item Box

This function calculates all the display parameters, the way IG_dspl_image_draw() does, and produces the same palette that IG_dspl_image_draw realizes before drawing onto hDC; it returns DevicePalette if it is not set with a custom value.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_dspl_palette_create(
        [IN] HIGEAR hIGear,
        [IN] DWORD dwGrpID,
        [IN] HWND hWnd,
        [IN] HDC hDC,
        [OUT] HPALETTE FAR* lphPalette
);

Arguments:

Name Type Description
hIGear HIGEAR ImageGear handle of image.
DwGrpID DWORD Identifier of group containing the palette options to use.
HWnd HWND Handle of window where the image is drawn.
HDC HDC Handle of device context on which to draw.
LphPalette HPALETTE FAR* Pointer to where the palette handle should be returned.

Return Value:

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

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

Medical, MFC

Example:

  Copy Code
HIGEAR           hIGear;      /* HIGEAR handle of image  */ 
DWORD           nGrpID;      /* display group identifier */
HPALETTE                hPalette;     /* handle of palette  */
 ...
IG_dspl_palette_create( hIGear, nGrpID, hWnd, hDC, &hPalette );
 ...
©2014. Accusoft Corporation. All Rights Reserved.