Fix alpha array ignored for RGB images in imshow. #31171
Fix alpha array ignored for RGB images in imshow. #31171matthewlos wants to merge 1 commit intomatplotlib:mainfrom
Conversation
Array alpha was silently ignored when passing RGB image data to imshow(). For RGBA images, array alpha replaced the existing alpha channel instead of multiplying with it. Now array alpha is used directly for RGB (3-channel) input, and multiplied with the existing alpha channel for RGBA (4-channel) input, consistent with scalar alpha behavior. Closes matplotlib#26092
|
Thank you for opening your first PR into Matplotlib! If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. You can also join us on gitter for real-time discussion. For details on testing, writing docs, and our review process, please see the developer guide. We strive to be a welcoming and open project. Please follow our Code of Conduct. |
|
This PR has identical code changes as #30795.
As a correction to what is written, this first bug was already fixed a long time ago, so is not something fixed by this PR. |
Array alpha was silently ignored when passing RGB image data to imshow(). For RGBA images, array alpha replaced the existing alpha channel instead of multiplying with it.
Now array alpha is used directly for RGB (3-channel) input, and multiplied with the existing alpha channel for RGBA (4-channel) input, consistent with scalar alpha behavior.
Closes #26092
PR summary
PR checklist