Skip to content

Conversation

@cirras
Copy link
Contributor

@cirras cirras commented Apr 8, 2024

Changes proposed in this pull request:

  • Add support for bitmaps with header size 52 (BITMAPV2INFOHEADER)
  • Add support for bitmaps with header size 56 (BITMAPV3INFOHEADER)
  • Improve adjacent comments around bitmap info headers

Notes:

  • These are poorly-documented and obscure formats, but they exist in the wild and are included in BMP Suite
  • Both formats are recognized by Adobe Photoshop and popular web browsers (Chromium, Firefox)
  • BITMAPV3INFOHEADER is recognized by Windows

cirras and others added 4 commits April 8, 2024 21:18
Size 52 is the undocumented `BITMAPV2INFOHEADER`.
It adds the RGB bit masks.

The format is known to be supported by:
- Adobe Photoshop
- Popular web browsers
Size 56 is the undocumented `BITMAPV3INFOHEADER`.
It adds the alpha bit mask.

The format is known to be supported by:
- Windows (MS paint, etc.)
- Adobe Photoshop
- Popular web browsers
@cirras cirras requested a review from radarhere April 10, 2024 10:57
@radarhere radarhere changed the title Add support for BITMAPV2INFOHEADER and BITMAPV3INFOHEADER Add support for reading BITMAPV2INFOHEADER and BITMAPV3INFOHEADER Apr 13, 2024
@radarhere radarhere merged commit 22705d3 into python-pillow:main Apr 13, 2024
@radarhere radarhere changed the title Add support for reading BITMAPV2INFOHEADER and BITMAPV3INFOHEADER Add support for reading BITMAPV2INFOHEADER and BITMAPV3INFOHEADER Apr 13, 2024
@cirras cirras deleted the obscure-bitmap-headers branch April 30, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants