Export image changes the original background image
RitaBeloMoreira opened this issue · 2 comments
Describe the bug
Hi,
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?
Thanks!
Tested here: https://vinoth.info/react-sketch-canvas/
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.
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.
Thanks for your answer, that works!!