Microsoft Windows CE 3.0  

Using 32 Bits per Pixel

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Like the 24-bpp format, the 32-bpp format is a true-color format. Unlike the 24-bpp format, however, the 32-bpp format does not cause pixels to cross DWORDboundaries, although this format is less efficient in memory use. There are two ways to arrange the color channels in this format. One method puts blue in the least significant byte of each pixel, and the other method puts red in the least significant byte. These options correspond to the PAL_BGR and PAL_RGB modes. Microsoft recommends using PAL_RGB for slightly better performance. The following table shows the masks that you can use to extract red, green, blue, and alpha channels from each pixel.

Color PAL_RGB mask PAL_BGR mask
Red 0x000000FF 0x00FF0000
Green 0x0000FF00 0x0000FF00
Blue 0x00FF0000 0x000000FF

If your product does not use an alpha channel, use 0x00000000 as the mask for alpha. The following illustration shows the arrangement of memory for the format.



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.