So I want to use input result as image source how can I do that?
I try to use input id as img.src but that clearly does not work, I also try to use img tag and use the put input result as img tag src, then call it on canvas, but also did not work, I'm really newbie on coding, so please my apologize if my question seems stupid:
html
<canvas id="image"></canvas>
js
var ctx = canvas.getContext('2d');
var img = new Image();
img.onload = function(){
canvas.width = img.naturalWidth
canvas.height = img.naturalHeight
ctx.drawImage(img, 0, 0);
}
img.src =