BMP
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Windows BMP Preview.
At a glance
| Original creator | Microsoft |
| Purpose | Device-independent bitmap images, originally and mainly on Windows and OS/2. |
| Extensions | .bmp |
| Poka parser | poka-bmp |
| Viewer | poka-image-with-meta-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B2 Broad (see Breadth tiers) |
How much Poka reads
B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16: parsers/poka-bmp/src/lib.rs (decode via image BmpDecoder under decode_within_budget, header_facts over DIB header, bpp, compression, row order, resolution), unit tests, tests/samples.rs (OS/2 core header, BITMAPINFOHEADER, RLE4, RLE8, BITFIELDS, 72 dpi); corpus header scan: 40-byte headers at 1/4/8/16/24/32 bpp, 12-byte OS/2, 108-byte V4, RLE4/RLE8, BITFIELDS, no V5. Decoder limits read in image-0.25.10 bmp/decoder.rs. Wasm route only: desktop hands the file to the webview.
What Poka does not read
- BI_JPEG and BI_PNG compressed BMPs are rejected by the decoder
- CMYK BMPs are rejected
- colour space and gamma fields (V4/V5) and embedded or linked ICC profiles are ignored
- no V5 (124-byte header) sample in the corpus
- OS/2 BITMAPCOREHEADER2 is named but decoding is not verified
- files whose declared size exceeds the 48 MiB decode budget are refused with metadata only
Background
The Library of Congress says several backwards-compatible versions came with new versions of Windows, the current one being version 5. Poka decodes the file with the image crate and shows it as a PNG, with the header type and other facts; the declared size is checked against the memory budget before any pixel is decoded.
Versions
| Version | Identifier | Poka | Note |
|---|---|---|---|
| OS/2 core headers, BITMAPINFOHEADER, BITMAPV4HEADER and BITMAPV5HEADER | BM |
Not recorded | The module names each header type it meets; decoding is the image crate's. Decoding of OS/2 BITMAPCOREHEADER2 is named but not verified, and the corpus holds no version 5 file. |
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- image (used; MIT OR Apache-2.0; Rust; https://github.com/image-rs/image)
- png (used; MIT OR Apache-2.0; Rust)
- Bitmap storage (Microsoft) (candidate; public spec; spec; https://learn.microsoft.com/en-us/windows/win32/gdi/bitmap-storage)
Sources
- https://loc.gov/preservation/digital/formats/fdd/fdd000189.shtml
- parsers/poka-bmp/src/lib.rs