Export image changes the original background image #92
-
Describe the bug When I export the image with background (exportWithBackgroundImage), the final image is cropped: -- Original Image -- Final Image with preserveBackgroundImageAspectRatio="none" -- Final Image with preserveBackgroundImageAspectRatio="xMidYMid meet" Can you please help me? Tested here: https://vinoth.info/react-sketch-canvas/ |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I just ran into the same problem. The problem arises because the background image is drawn on the canvas in the original size. So, if the image is bigger than the canvas it will be cropped. My solution was to resize the image to the same size as the canvas before passing it to the backgroundImage prop. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer, that works!! |
Beta Was this translation helpful? Give feedback.
I just ran into the same problem.
The problem arises because the background image is drawn on the canvas in the original size.
So, if the image is bigger than the canvas it will be cropped.
My solution was to resize the image to the same size as the canvas before passing it to the backgroundImage prop.