-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Applying small mask on big image #2531
Comments
I managed to solve this issue, here is a working fiddle. |
I did not give you any comment yet, i did not have time to check how mask is supposed to work. |
Basically if the image is 1600 * 1200 and the mask is 375 * 375, the mask gets applyed only on the first 375 * 375 pixels of the original image, I changed this and now the mask is applied correctly because I draw it on a canvas big as the orignal image before applying it. So this is what happens in the fiddle. |
i think your solution here is correct. |
I've already created the pull request with this fix. |
yes i was refferring to that. |
Hi,
I'm trying to apply a mask on an image. If the mask is of the same size of the image everything works fine, but when I use a bigger image, the output is incorrect.
I've created 2 fiddles, one with the correct image and one with the big image.
I think the problem could be in:
Because it iterates over imageDatawidth * imageDataHeight which is 1600 * 1200, instead the mask is only 375 * 375, so probably this is the problem. I'll work on this, but in the meantime I was wondering if I'm mistaking something o if someone else has already find a solution?
The text was updated successfully, but these errors were encountered: