How do I scale canvas to screen size and save full size image from the canvas
I’m using Fabric.js 5.3.1 in a website where users can upload a photo and mark them up. Everything seems to be working however when I set the uploaded image to the background of the canvas and scale it to fit the screen, then save that image, the image is the same size as its scaled dimensions. Meaning if I upload a 1920×1080 image, set it to the canvas’ background image, then scale the canvas down to screen size (say 600×337.5) then save the image using canvas.toDataUrl()
my saved image is 600×337.5.
Fabric.js – How do I scale canvas to screen size and save full size image from the canvas
I’m using Fabric.js 5.3.1 in a website where users can upload a photo and mark them up. Everything seems to be working however when I set the uploaded image to the background of the canvas and scale it to fit the screen, then save that image, the image is the same size as its scaled dimensions. Meaning if I upload a 1920×1080 image, set it to the canvas’ background image, then scale the canvas down to screen size (say 600×337.5) then save the image using canvas.toDataUrl()
my saved image is 600×337.5.
Fabric.js – How do I scale canvas to screen size and save full size image from the canvas
I’m using Fabric.js 5.3.1 in a website where users can upload a photo and mark them up. Everything seems to be working however when I set the uploaded image to the background of the canvas and scale it to fit the screen, then save that image, the image is the same size as its scaled dimensions. Meaning if I upload a 1920×1080 image, set it to the canvas’ background image, then scale the canvas down to screen size (say 600×337.5) then save the image using canvas.toDataUrl()
my saved image is 600×337.5.