Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Fix: Change alpha application for RGBA from overwrite to multiply#30523
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
LangQi99 commentedSep 8, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
rcomer left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for your work on this@LangQi99 and sorry you did not get a response sooner. The fix looks right to me. However, this is a breaking change, as shown by the modified test. I do not think we can reasonably provide a deprecation pathway for this, but it should have anAPI change note.
| (im_rgb, | ||
| (scalar_alpha*array_alpha).reshape((ny,nx,1))), | ||
| axis=-1), | ||
| interpolation_stage=intp_stage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This looks like a style-only change. Please revert.


Uh oh!
There was an error while loading.Please reload this page.
PR summary
Closes#26092
Per community consensus in#26092, the behavior for RGBA inputs has been changed from overwriting to blending; the image's intrinsic alpha is now multiplied with the passed alpha value. This change unifies alpha handling for 2D, RGB, and RGBA images, making the behavior consistent and predictable.
PR checklist