Repository navigation
Closed
Labels
Milestone
Description
We currently support BITMAPCOREHEADER & BITMAPINFOHEADER should add support for loading metadata from the other formats
Our current support matrix:
| Supported | Size | Header name | OS support | Features | Written by |
|---|---|---|---|---|---|
| ✔️ | 12 | BITMAPCOREHEADER/OS21XBITMAPHEADER |
Windows 2.0 or laterOS/2 1.x[2] | ||
| ❎ | 64 | OS22XBITMAPHEADER |
OS/2 BITMAPCOREHEADER2 | Adds halftoning. Adds RLE and Huffman 1D compression. | |
| ✔️ | 16 | OS22XBITMAPHEADER |
This variant of the previous header contains only the first 16 bytes and the remaining bytes are assumed to be zero values.[2]An example of such a case is the graphic pal8os2v2-16.bmp[9] of the BMP Suite.[10] | ||
| ✔️ | 40 | BITMAPINFOHEADER |
Windows NT, 3.1x or later[1] | Adds 16 bpp and 32 bpp formats. Adds RLE compression. | |
| ✔️ | 52 | BITMAPV2INFOHEADER |
Undocumented | Adds RGB bit masks. | Adobe Photoshop |
| ✔️ | 56 | BITMAPV3INFOHEADER |
Not officially documented, but this documentation was posted on Adobe's forums, by an employee of Adobe with a statement that the standard was at one point in the past included in official MS documentation [11] | Adds alpha channel bit mask. | Adobe Photoshop |
| ❎ | 108 | BITMAPV4HEADER |
Windows NT 4.0, 95 or later | Adds color space type and gamma correction | |
| ❎ | 124 | BITMAPV5HEADER |
Windows NT 5.0, 98 or later | Adds ICC color profiles |
✔️ : Currently supported
❎ : Partial support (we read the BITMAPINFOHEADER fields but ignore the rest)
❌ : Not currently supported
Reacted by Anton Firszov, James Jackson-South and Brian Popow
Activity
JimBobSquarePants commentedon Aug 13, 2018
This should help anyone wanting to take this on.
Code C++:
https://dxr.mozilla.org/mozilla-central/source/image/decoders/nsBMPDecoder.h
https://dxr.mozilla.org/mozilla-central/source/image/decoders/nsBMPDecoder.cpp
Test Images
http://eclecticgeek.com/dompdf/core_tests/image_bmp.html
brianpopow commentedon Jan 20, 2019
@tocsoft: Bitmap header with 52 bytes and with 56 bytes are now fully supported. Both are special adobe bitmap headers which contain the color masks.
JimBobSquarePants commentedon Feb 18, 2019
@brianpopow I've updated the table. Thanks for your effort!
brianpopow commentedon Feb 18, 2019
@JimBobSquarePants: actually OS22XBITMAPHEADER headers are partially supported. The compression types RLE4, RLE8 and uncompressed are supported. RLE24 and 1D Huffman is not supported.
brianpopow commentedon Apr 24, 2020
I think this issue can be closed. We support all relevant bitmap variants now.
There are some exotic variants we do not support, like BMP files with embedded JPEG and PNG images (which are for printers). Or some OS/2 icon bitmap variants. It would be just a solely academic exercise to add support for those, as i really doubt that those can be found in the wild.
JimBobSquarePants commentedon Apr 24, 2020
Sounds good to me @brianpopow 👍