参考:
(biWidth* biBitCount+31)/32*4
// +31是为了凑足32位,/32 得到有多少个 32位,也就是多少个 4字节, *4 得到多少个字节
typedef struct tagBITMAPINFO {
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO, *PBITMAPINFO;
typedef struct tagBITMAPINFOHEADER {
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER;
本文介绍了位图信息头(BITMAPINFOHEADER)的数据结构及其关键字段的意义,特别是如何通过位图宽度和颜色位数计算位图大小。此外,还详细解释了用于存储位图信息的BITMAPINFO结构。
1201

被折叠的 条评论
为什么被折叠?



