Fix image alpha #6659

Merged
merged 3 commits into from Jun 29, 2016

Conversation

Projects
None yet
3 participants
Owner

mdboom commented Jun 28, 2016

Fixes #6540 in a different way than #6551. It turns out the vector backends were already correct and the only bug was in the agg backend. So this just updates the agg backend to ignore the alpha on images.

This is because for the case of interpolation=='none' in a vector backend we explicitly do not want to touch the image data at all, so the alpha must be applied in the vector renderer instructions, not in the image data itself.

The Agg backend doesn't really make sense for that and we always transform the image, so it is a special case.

Cc: @tacaswell

mdboom added some commits Jun 28, 2016

@mdboom mdboom Fix image alpha in PNG backend 22806ae
@mdboom mdboom Update test images
fde4e63

mdboom added the needs_review label Jun 28, 2016

@mdboom mdboom Update image_composite_alpha test
283c352

@tacaswell tacaswell merged commit 31be20b into matplotlib:master Jun 29, 2016

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 70.275%
Details

tacaswell removed the needs_review label Jun 29, 2016

@tacaswell tacaswell added a commit that referenced this pull request Jun 29, 2016

@tacaswell tacaswell Merge pull request #6659 from mdboom/fix_image_alpha
FIX: double image alpha in Agg
c0d4321
Owner

tacaswell commented Jun 29, 2016

backported to v2.x as c0d4321

QuLogic added the Alpha color label Sep 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment