Skip to content

Fix for DIB/BMP images - #1813

Merged
hugovk merged 2 commits into
python-pillow:masterfrom
wiredfool:DIB_1293
Apr 6, 2016
Merged

hugovk merged 2 commits into
python-pillow:masterfrom
wiredfool:DIB_1293

Conversation

@wiredfool

Copy link
Copy Markdown
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
Copy Markdown

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