Categories:
Android (1)
Audio (7)
C/C++ (2)
Compression (7)
Database (6)
Document (14)
Email (3)
General (50)
Graphics (17)
Image (8)
Java (1)
Picture (1)
Presentation (7)
Programming (17)
Spreadsheet (11)
Video (8)
Web (13)
Windows (63)
XML (4)
Other Resources:
.BMP Image File Format Specification
What are specifications of the .BMP image file format?
✍: FYIcenter.com
BMP, short name for Bitmap, is used as the file extension for bitmap image files.
.BMP file format was originally designed by Microsoft as part of their Windows Metafile (WMF) specification.
.BMP image file format is composed of structures in the following order:
1. Bitmap file header - Required with 14 bytes. Used to store general information about the bitmap image file. The following table provides details of the 14-byte .BMP file header:
00-01 (2-bytes) - The BMP file identifier with these possible values:
BM – Windows 3.1x, 95, NT, ... etc.
BA – OS/2 struct bitmap array
CI – OS/2 struct color icon
CP – OS/2 const color pointer
IC – OS/2 struct icon
PT – OS/2 pointer
02-05 (4 bytes) - The size of the BMP file in bytes
06-07 (2 bytes) - Reserved for the application that creates the image
08-09 (2 bytes) - Reserved for the application that creates the image
0A-0D (4 bytes) - The offset, i.e. starting address, of the byte
where the bitmap image data (pixel array) can be found.
2. DIB (Device Independent Bitmaps) header - Required with different lengths for different versions. Used to store detailed information about the bitmap image and define the pixel format.
3. Extra bit masks - Optional with 12 or 16 bytes. Used to define the pixel format. Present only in case the DIB header is the BITMAPINFOHEADER and the Compression Method member is set to either BI_BITFIELDS or BI_ALPHABITFIELDS
4. Color table - Optional with variable-size. Used to define colors used by the bitmap image data (Pixel array). Mandatory for color depths = 8 bits
5. Gap1 - Required with variable-size. used as a structure alignment
6. Pixel array - Required with variable-size. Used to define the actual values of the pixels. The pixel format is defined by the DIB header or Extra bit masks. Each row in the Pixel array is padded to a multiple of 4 bytes in size
7. Gap2 - Optional with variable-size. Used as a structure alignment.
8. ICC color profile - Optional with variable-size. Used to define the color profile for color management. Can also contain a path to an external file containing the color profile.
The picture below provides a visual illustration of the .BMP image file structure
with details of the DIB header:

2015-11-30, 6129👍, 0💬
Popular Posts:
What is BIN? BIN, short name for Binary, is used as the file extension for Binary Data files. .BIN f...
What is VDX? VDX, short name for Visio Drawing XML, is used as the file extension for Visio Drawing ...
Karaoke files storing MIDI music messages and synchronized lyrics to play on Karaoke machines. A KAR...
File extension DAT is used for multimedia files stored on VCD disks. A DAT sample file is provided. ...
What is CS? CS, short name for C Sharp, is used as the file extension for C# (C Sharp) files. .CS fi...