Answer the question
In order to leave comments, you need to log in
How to load third party image in canvas?
It is necessary that the image from input[type='file'] is loaded into the canvas. You can make it so that the first loading occurs in the img tag, and already from img to canvas, no difference.
Answer the question
In order to leave comments, you need to log in
input - on change
you have a URL in ev.target.result
And then:
var img = new Image;
img.onload = function(){
canvas.drawImage(img,0,0);
};
img.src = ev.target.result;
https://www.w3schools.com/tags/canvas_drawimage.asp
+
stackoverflow.com/questions/18457340/how-to-previe...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question