The Wayback Machine - https://web.archive.org/web/20240106173901/https://github.com/matplotlib/matplotlib/pull/27562
Skip to content
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

Avoid an extra copy/resample if imshow input has no alpha #27562

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Dec 23, 2023

PR summary

This is probably the best we can do to fix #27554 at this time, without delving into re-writing the Agg resampler (which, as the Python code notes, does require RGBA.)

Also adds a test, as it appears that nothing checked an RGB input with transparent alpha (and my original suggestion from #27554 (comment) using 255/1.0 passed tests even though it didn't work.)

PR checklist

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this get changed below as well in the else half of the interpolation_stage loop?

@tacaswell tacaswell added this to the v3.9.0 milestone Dec 26, 2023
This is probably the best we can do to fix matplotlib#27554 at this time, without
delving into re-writing the Agg resampler (which, as the Python code
notes, does require RGBA.)
@QuLogic
Copy link
Member Author

QuLogic commented Jan 3, 2024

This is in the else half, isn't it?

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

Successfully merging this pull request may close these issues.

[Bug]: Large image draw performance deterioration in recent releases
3 participants