8000 Fix #5302: Proper alpha-blending for jpeg by mdboom · Pull Request #5324 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

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
Add prints to test
  • Loading branch information
mdboom committed Oct 27, 2015
commit 737da1e59a8fe55e8f0901d9d2561af890ee07a1
2 changes: 2 additions & 0 deletions lib/matplotlib/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,11 @@ 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.
print("num colors: ", len(image.getcolors(256)))
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
print("corner pixel: ", image.getpixel((0, 0)))
assert image.getpixel((0, 0)) == (254, 0, 0)


Expand Down
0