Windows bitmap file

xiaoxiao2021-03-06  70

All Bitmap files start from the BitmapFileHeader structure:

Typedef struct

{

Word bftype; // file identifier (must be "bm")

DWORD BFSIZE; // File size (in bytes)

Word bfreserved1; // is retained, usually 0

Word bFReServed2; // image data offset (in bytes)

} BitmapfileHeader;

The following is the BitMapInfoHeader structure, mainly used to describe the image:

Typedef struct

{

DWORD Bisize; // BitmapInfoHeader Size (in bytes)

Long biwidth; // Image of the image (in pixel)

Long biheight; // Image of the image (in pixel)

Word biplanes; // Color flat number (general 1) Word bibitcount // Each pixel occupies DWORD BICOMPRESSION; // Compressed Type DWORD BisizeImage; // Image Size (in bytes) Long Bixpelspermeter ; // horizontal pixel number / m rice long biypelspermeter; // vertical pixel number / m rice DWORD biclrused; // The color index number used DWORD BICLRIMPORTANT; // 'Important' color

} BitmapInfoHeader;

转载请注明原文地址:https://www.9cbs.com/read-120446.html

New Post(0)