## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreDeviceCreatePalette - Remarks

When an application sets a bit map, the bits are specified as indexes into the color table supplied with the bit map. The presentation driver allocates its own copy of the bit map.

The driver-level pels contain indexes to the nearest color in the default physical palette.

Note: This means that GreGetBitMapBits does not necessarily return the same bit map that the application set. Information may be lost if the bit map is taken to a less color-capable system and then brought back to the ( more capable) system on which it was created.

However, an application can select a palette into a memory DC. This causes the color table and the bit-map bits to change to the nearest mapping to the new palette. Calls to GreRealizePalette are not performed on memory DCs . The palette takes effect as soon as it is selected.

The presentation driver is expected to perform any allocation and data structure needed for a subsequent GreDeviceResizePalette to succeed.