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. |
A bitmap is an array of bits that creates an image when it is mapped to a rectangular pixel array on an output device. Windows CE supports device-independent bitmaps (DIBs). A DIB has its own color table and can be displayed on a variety of devices. Most graphics information is stored in DIB format.
The data needed to draw a DIB is stored in a BITMAPINFOstructure, which consists of a BITMAPINFOHEADERstructure and an array of two or more RGBQUADstructures. BITMAPINFOHEADERcontains information about the dimensions and color format of the DIB. Each RGBQUADstructure defines one of the colors used by the bitmap. The array of RGBQUADstructures is called a color table.
Windows CE supports bitmaps with pixel depths of 1, 4, 8, 16, 24, or 32 bits per pixel (bpp). It does not support compressed bitmap formats, such as run-length encoded bitmaps.
Bitmaps of 1, 4, and 8 bpp are palettized, and BITMAPINFOincludes a color table of the length implied by the biBitCountmember of BITMAPINFOHEADER. For non-palettized images of 16 or 32 bpp, the color table contains three entries that specify the red, green, and blue intensities. The 24-bpp bitmaps do not use a color table; each image pixel is in RGB format.
To store a DIB in memory
To transfer the DIB to a DirectDraw surface
Note Because arbitrary formats are supported, you can perform a bit block transfer (blit) between bitmaps with different pixel depths. Windows CE automatically translates source pixels to the nearest matching color that can be represented in the target format.
Related Topics
Working with DirectDraw Surfaces
Last updated on Tuesday, May 18, 2004