struct WINBMPINFOHEADER
时间: 2023-07-18 07:16:43 浏览: 36
WINBMPINFOHEADER 是 Windows 中用于处理 BMP 格式信息头的结构体。它通常包含图像宽度、高度、位深度、压缩类型等信息。具体来说,它的定义如下:
```
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, *PBITMAPINFOHEADER;
```
其中,
- biSize 表示信息头的大小,通常是 40。
- biWidth 和 biHeight 分别表示图像的宽度和高度(单位:像素)。
- biPlanes 表示位面数,必须设置为 1。
- biBitCount 表示位深度,即每个像素占用的位数。
- biCompression 表示压缩类型,如 BI_RGB 表示不压缩,BI_RLE8 表示使用 RLE8 压缩等。
- biSizeImage 表示图像数据的大小(单位:字节)。
- biXPelsPerMeter 和 biYPelsPerMeter 表示水平和垂直分辨率(单位:像素/米)。
- biClrUsed 表示实际使用的调色板索引数,如果为 0 表示使用所有的调色板索引。
- biClrImportant 表示重要的调色板索引数,如果为 0 表示都重要。
这些信息可以通过读取 BITMAPINFOHEADER 结构体来解析 BMP 图像的信息头。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)