Skip to content

Add error check for pixelDensity in mask() #1107

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

Merged
merged 2 commits into from
Jul 11, 2025

Conversation

pnngocdoan
Copy link
Contributor

Resolves: #1065

Changes:
Add an error check for the mask() function in PImage.java to ensure both pixelWidth and pixelHeight of both imgs are matched.

Tests:
When pixel sizes don't match due to density difference, it will show an error line like below
image

When density doesn't match but underlying pixel size matches:
image

@Stefterv Stefterv added this to the 4.4.5 milestone Jun 20, 2025
@SableRaf SableRaf merged commit 2de754a into processing:main Jul 11, 2025
12 checks passed
@SableRaf
Copy link
Collaborator

Thanks @pnngocdoan for your contribution! ✨

@all-contributors please add @pnngocdoan for code

Copy link
Contributor

@SableRaf

I've put up a pull request to add @pnngocdoan! 🎉

@processing processing deleted a comment from allcontributors bot Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PImage.mask() broken
3 participants