BITMAPINFO

This structure defines the dimensions and color information of a Windows-based device-independent bitmap (DIB).

At a Glance

Header file: Wingdi.h
Windows CE versions: 1.0 and later

Syntax

typedef struct tagBITMAPINFO {
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
}
BITMAPINFO;

Members

bmiHeader

Specifies a bitmap information header structure that contains information about the dimensions of color format. Use the BITMAPINFOHEADER structure.

bmiColors

Contains one of the following:

Remarks

A device-independent bitmap consists of two distinct parts: a BITMAPINFO structure describing the dimensions and colors of the bitmap, and an array of bytes defining the pixels of the bitmap. The bits in the array are packed together, but each scan line must be padded with zeroes to end on a LONG data-type boundary. If the height of the bitmap is positive, the bitmap is a bottom-up DIB and its origin is the lower-left corner. If the height is negative, the bitmap is a top-down DIB and its origin is the upper left corner.

A bitmap is packed when the bitmap array immediately follows the BITMAPINFO header. Packed bitmaps are referenced by a single pointer. For packed bitmaps, the ClrUsed member of the BITMAPINFOHEADER structure must be set to an even number when using the DIB_PAL_COLORS mode so the DIB bitmap array starts on a DWORD boundary.

Note

The bmiColors member should not contain palette indexes if the bitmap is stored in a file or transferred to another application.

Unless the application has exclusive use and control of the bitmap, the bitmap color table should contain explicit RGB values.

See Also

BITMAPINFOHEADER, CreateDIBSection, RGBQUAD, CreateDIBPatternBrushPt, SetClipboardData, LOGBRUSH