-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Fix size of maskCanvas to draw image masks correctly #17148
Fix size of maskCanvas to draw image masks correctly #17148
Conversation
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.
Thanks for the patch; I've left a couple of inline comments below.
Can you please also add a reference-test?
For an example of how that's done, see e.g. 459d26e#diff-bbeef90df04bff7617f7ef59e3f37cac92192c5169bc500d857bd6fb107fcabd (and below).
Please squash the commits into one (we don't use separate fixup commits in this projects); see https://github.com/mozilla/pdf.js/wiki/Squashing-Commits |
Use existing helper to calculate the Box Co-authored-by: Jonas Jenwald <[email protected]> Ensure that there are non-zero Co-authored-by: Jonas Jenwald <[email protected]> Add a reference test for mozilla#17147
e83c9ed
to
0eacd5c
Compare
Thank you for your review and feedback. I appreciate your time and effort.
I was not aware of its existence. I have updated my code to use it instead of re-implementing it.
I removed it by mistake. I have restored it in the latest commit. Thank you for catching that error. Please let me know if you have any further suggestions or questions. Thank you again for your support. |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/69df77d1bcdbad5/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/69df77d1bcdbad5/output.txt Total script time: 24.92 mins
Image differences available at: http://54.241.84.105:8877/69df77d1bcdbad5/reftest-analyzer.html#web=eq.log |
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.
r=me, thank you!
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/d74e85ae39ab116/output.txt |
Thanks for the contribution! |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/d74e85ae39ab116/output.txt Total script time: 19.52 mins
|
/botio-windows makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/0c5787c1f9e595b/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/0c5787c1f9e595b/output.txt Total script time: 23.07 mins
|
The current code creates a Canvas for drawing an ImageMask using only the top-left and bottom-right coordinates of the ImageMask. This code cannot allocate an area on the Canvas to draw the entire ImageMask when the ImageMask is rotated. Therefore, I modified the code to use the four corner coordinates of the ImageMask when creating the Canvas. I also adjusted the offset for drawing on the Canvas according to this modification.
This is a fix for #17147 .