![]() |
Leptonica 1.85.0
Image processing and image analysis suite
|
#include <bmp.h>
Data Fields | |
| l_uint8 | bfType [2] |
| l_uint8 | bfSize [4] |
| l_uint8 | bfReserved1 [2] |
| l_uint8 | bfReserved2 [2] |
| l_uint8 | bfOffBits [4] |
BMP file header
Notes: (1) The bfSize field is stored as a 32 bit integer and includes the size of the BMP_FileHeader, BMP_InfoHeader, the color table (if any), and the size of the DIB bits. (2) The bfOffBits field is also stored as a 32 bit integer and contains the absolute offset in bytes of the image data in this file. Some bmp files have additional data after the BMP_InfoHeader and before the color table (if it exists). However, enabling reading of these files makes the reader vulnerable to various malware attacks. Therefore we do not read bmp files with extra data, and require that the size of the color table in bytes is offset - sizeof(BMP_FileHeader) - sizeof(BMP_InfoHeader) (3) Use arrays of l_uint8[] to make an endianness agnostic access to the BMP_FileHeader easier.
| l_uint8 BMP_FileHeader::bfOffBits[4] |
offset from beginning of file
Definition at line 78 of file bmp.h.
Referenced by pixReadMemBmp(), and pixWriteMemBmp().
| l_uint8 BMP_FileHeader::bfSize[4] |
length of the file; sizeof(BMP_FileHeader) + sizeof(BMP_InfoHeader) + size of optional extra data + size of color table + size of DIB bits
Definition at line 70 of file bmp.h.
Referenced by pixWriteMemBmp().
| l_uint8 BMP_FileHeader::bfType[2] |
file type; must be "BM"
Definition at line 69 of file bmp.h.
Referenced by pixReadMemBmp(), and pixWriteMemBmp().