Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
LangQi99 wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromLangQi99:fix-26092

Conversation

@LangQi99
Copy link
Contributor

@LangQi99LangQi99 commentedSep 7, 2025
edited by rcomer
Loading

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

@LangQi99LangQi99 changed the titleDraft: Fix: support alpha array for RGB images (closes #26092)Draft: Fix: support alpha array for RGBA images (closes #26092)Sep 7, 2025
@github-actionsgithub-actionsbot added the Documentation: examplesfiles in galleries/examples labelSep 7, 2025
@LangQi99LangQi99 changed the titleDraft: Fix: support alpha array for RGBA images (closes #26092)Fix: support alpha array for RGBA images (closes #26092)Sep 7, 2025
@LangQi99LangQi99 marked this pull request as ready for reviewSeptember 7, 2025 17:04
@LangQi99
Copy link
ContributorAuthor

LangQi99 commentedSep 8, 2025
edited
Loading

Old Behavior pay attention to the bottom right
Figure_2

New Behavior
Figure_fix

@LangQi99LangQi99 changed the titleFix: support alpha array for RGBA images (closes #26092)Fix: Change alpha application for RGBA from overwrite to multiplySep 9, 2025
Copy link
Member

@rcomerrcomer left a 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)
Copy link
Member

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.

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

Reviewers

@rcomerrcomerrcomer left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: alpha array-type not working with RGB image in imshow()

2 participants

@LangQi99@rcomer

[8]ページ先頭

©2009-2025 Movatter.jp