BMP file format
Windows Bitmap
BMP is Microsoft's uncompressed bitmap format. It's simple and lossless but huge: every pixel is stored raw, so a 12-megapixel photo takes about 36 MB.
| Property | BMP |
|---|---|
| File extensions | .bmp, .dib |
| MIME type | image/bmp |
| Introduced | 1985 by Microsoft |
| Compression | Usually none (optional RLE) |
| Transparency | Rarely (32-bit only) |
| Animation | No |
| Colour depth | 1 to 32-bit |
| Support | Windows, most editors, all major browsers |
| Best for | Legacy Windows software, embedded displays |
What is a BMP file?
BMP (bitmap, also called DIB — device-independent bitmap) is the native raster format of Microsoft Windows, dating back to the earliest versions of Windows and OS/2. A BMP file is a small header followed by rows of pixel values, stored bottom-to-top and padded to multiples of 4 bytes.
BMP supports 1, 4 and 8-bit palette images and 16, 24 and 32-bit colour. Optional run-length encoding exists for palette images, but most BMPs are uncompressed.
Strengths and weaknesses of BMP
BMP's simplicity is its strength: it's trivial to read and write in code, which is why it's still used by microcontroller display libraries, machine-vision tools and older Windows programs. It's also lossless.
Its weakness is size. A 24-bit BMP needs width × height × 3 bytes — about 6.2 MB for a Full HD 1920 × 1080 image and 36 MB for a 12-megapixel photo. Transparency support is inconsistent, so most software treats BMPs as opaque.
When should you use BMP?
Only when a specific program or device requires it. For storage and sharing, PNG is lossless and far smaller; for photos, use JPG.
