You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is specific to RGBA - I noticed it first with the code from #26092 (comment), where only the top two plots of the righthand column are affected.
Undoing the in-place multiplication by putting a A[..., :3] /= A[..., 3:] after the resample line fixes this, so I think you're definitely correct about what's causing it. I'm not sure if adding that line is the best fix or not though.
Activity
[-][Bug]: image alpha blending re-applied each draw?[/-][+][Bug]: image alpha re-applied each draw?[/+]rcomer commentedon Apr 9, 2025
I think it's because for RGBA we are multiplying the original array here, but I am way out of my depth...
matplotlib/lib/matplotlib/image.py
Line 523 in 7e997ae
dstansby commentedon Apr 9, 2025
This bisects to 27cb5e3
dstansby commentedon Apr 9, 2025
Which is consistent with your instict that it's that line that's caused the issue
dstansby commentedon Apr 9, 2025
Undoing the in-place multiplication by putting a
A[..., :3] /= A[..., 3:]after the resample line fixes this, so I think you're definitely correct about what's causing it. I'm not sure if adding that line is the best fix or not though.rcomer commentedon Apr 9, 2025
@dstansby thanks! I have started a branch, so will put up a PR soon and we can hash it out :-)