Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for reading BITMAPV2INFOHEADER and BITMAPV3INFOHEADER #7956

Merged
merged 7 commits into from
Apr 13, 2024
Merged

Add support for reading BITMAPV2INFOHEADER and BITMAPV3INFOHEADER #7956

merged 7 commits into from
Apr 13, 2024

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
57 of 59 checks passed
@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