"canvas.todataurl("image/png")" Not Working Properly In Firefox
I have a web page with file input field.I wanted to , Upload a image file. create image element using uploaded image. draw it on canvas get 'DataURL' of canvas. This process work
Solution 1:
Wait for the image to load.
img.onload = function(){
var canvas = ...
};
img.src = e.target.result;
Please note that this is a copy-n-paste of @kaiido's comment, as he refused to repost it as an answer. Credit goes to him.
Post a Comment for ""canvas.todataurl("image/png")" Not Working Properly In Firefox"