Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix #5302: Proper alpha-blending for jpeg #5324

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

Merged
merged 5 commits into from
Oct 28, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
mdboom committed Oct 27, 2015
commit 183f246cfca1d804d7b905b324d0fe610e2322cb
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,10 @@ def test_jpeg_alpha():

# If this fails, there will be only one color (all black). If this
# is working, we should have all 256 shades of grey represented.
assert len(image.getcolors(256)) == 179
assert len(image.getcolors(256)) >= 170 and len(image.getcolors(256)) <= 180
# The fully transparent part should be red, not white or black
# or anything else
assert image.getpixel(0, 0) == (0, 0, 255)
assert image.getpixel((0, 0)) == (254, 0, 0)


if __name__=='__main__':
Expand Down