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

Fix for DIB/BMP images #1813

Merged
merged 2 commits into from
Apr 6, 2016
Merged

Fix for DIB/BMP images #1813

merged 2 commits into from
Apr 6, 2016

Conversation

wiredfool
Copy link
Member

Fixes #1293, probably #1810 and #1811 as well.

The DIB image file is slightly extended from the documentation that I've found. The fixes here are based on reverse engineering one individual file, with partial confirmation by published documentation.

The DIB image format uses the 40 byte BMP header, followed by 3 masks
for RGB channels. We were reading 4 masks, consuming the first pixel
of the image.

Mostly fixes issue python-pillow#1293. Remaining issue: alpha channel is actually a
transparency mask.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 77.04% when pulling 0e3caec on wiredfool:DIB_1293 into 3242b5c on python-pillow:master.

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.

Problem with saving image from clipboard
3 participants