Skip to content

Bitmap DIB Header formats #320

Closed
Closed

Description

@tocsoft

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

https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.28bitmap_information_header.29

Activity

  1. added this to the Future milestone on Dec 15, 2017
  2. JimBobSquarePants commented on Aug 13, 2018

    @JimBobSquarePants
    Member
  3. brianpopow commented on Jan 20, 2019

    @brianpopow
    Collaborator

    @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.

  4. JimBobSquarePants commented on Feb 18, 2019

    @JimBobSquarePants
    Member

    @brianpopow I've updated the table. Thanks for your effort!

  5. brianpopow commented on Feb 18, 2019

    @brianpopow
    Collaborator

    @JimBobSquarePants: actually OS22XBITMAPHEADER headers are partially supported. The compression types RLE4, RLE8 and uncompressed are supported. RLE24 and 1D Huffman is not supported.

  6. brianpopow commented on Apr 24, 2020

    @brianpopow
    Collaborator

    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.

  7. JimBobSquarePants commented on Apr 24, 2020

    @JimBobSquarePants
    Member

    Sounds good to me @brianpopow 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions