![]() |
Leptonica
1.83.1
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] |
l_uint8 BMP_FileHeader::bfSize[4] |
l_uint8 BMP_FileHeader::bfType[2] |