BITMAPINFO: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
typedef BITMAPINFO *PBITMAPINFO; | typedef BITMAPINFO *PBITMAPINFO; | ||
==Fields== | |||
;cbFix (ULONG) | |||
:Length of fixed portion of structure. | |||
:This length can be determined using sizeof(BITMAPINFOHEADER). | |||
;cx (USHORT) | |||
:Bitmap width in pels. | |||
;cy (USHORT) | |||
:Bitmap height in pels. | |||
;cPlanes (USHORT) | |||
:Number of bit planes. | |||
;cBitCount (USHORT) | |||
:Number of bits per pel within a plane. | |||
;argbColor[1] (RGB) | |||
:Array of RGB values. | |||
:This is a packed array of 24-bit RGB values. If there are N bits per pel (N = cPlanes * cBitCount), the array contains 2**N RGB values. However, if N = 24, the bit map does not need the color color array because the standard-format bit map, with 24 bits per pel, is assumed to contain RGB values. | |||
[[Category:GPI Data type]] | [[Category:GPI Data type]] |
Revision as of 18:21, 25 May 2024
Bit-map information structure.
Each bit plane logically contains (cx * cy * cBitCount) bits, although the actual length can be greater because of padding.
See also BITMAPINFO2, which is preferred.
typedef struct _BITMAPINFO { ULONG cbFix; /* Length of fixed portion of structure. */ USHORT cx; /* Bit-map width in pels. */ USHORT cy; /* Bit-map height in pels. */ USHORT cPlanes; /* Number of bit planes. */ USHORT cBitCount; /* Number of bits per pel within a plane. */ RGB argbColor[1]; /* Array of RGB values. */ } BITMAPINFO; typedef BITMAPINFO *PBITMAPINFO;
Fields
- cbFix (ULONG)
- Length of fixed portion of structure.
- This length can be determined using sizeof(BITMAPINFOHEADER).
- cx (USHORT)
- Bitmap width in pels.
- cy (USHORT)
- Bitmap height in pels.
- cPlanes (USHORT)
- Number of bit planes.
- cBitCount (USHORT)
- Number of bits per pel within a plane.
- argbColor[1] (RGB)
- Array of RGB values.
- This is a packed array of 24-bit RGB values. If there are N bits per pel (N = cPlanes * cBitCount), the array contains 2**N RGB values. However, if N = 24, the bit map does not need the color color array because the standard-format bit map, with 24 bits per pel, is assumed to contain RGB values.