ImageGear Professional v18.4 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > DIB Functions > IG_DIB_palette_pointer_get |
This function returns a pointer to the DIB's palette, if it is present; otherwise it returns NULL.
Copy Code
|
|
---|---|
LPAT_RGBQUAD ACCUAPI IG_DIB_palette_pointer_get( HIGDIBINFO hDIB ); |
Name | Type | Description |
hDIB | HIGDIBINFO | DIB info handle. |
Pointer to the DIB palette, if it is present; NULL - otherwise.
All pixel formats supported by ImageGear Professional.
Load Callback, Medical, MFC PDF Demo
Copy Code
|
|
---|---|
AT_ERRCOUNT nErrcount; /* Number of errors on stack */ HIGDIBINFO hDIB; /* DIB info handle */ AT_INT nEntries; /* Number of palette entries */ LPAT_RGBQUAD lpPalette; /* Pointer to palette data */ AT_INT i; /* Index for palette loop */ /* Make a palette in which every color is GREEN */ nErrcount = IG_DIB_palette_alloc(hDIB); nEntries = IG_DIB_palette_length_get(hDIB); lpPalette = IG_DIB_palette_pointer_get(hDIB); for (i = 0; i < nEntries; i++) { lpPalette[i].rgbRed = lpPalette[i].rgbBlue = 0; lpPalette[i].rgbGreen = 255; } |
You can use this to get and set palette entries or the palette as a whole.