I tore my hair! I got this work, I thought: “I can afford not to save a version of this,” and then I broke the “assembly”.
The line myImageData = context.getImageData(0, 0, canvas.width, canvas.height);seems to violate this, as the warning will work earlier, but not after it.
Downloading the image itself.
Any suggestions are welcome ^ _ ^ I am at the end of the cable and am going to get RSI from myself.
var myImageData;
var image_var = new Image();
image_var.onload = function () {
canvas.width = image_var.width;
canvas.height = image_var.height;
context.drawImage(image_var, 0, 0, image_var.width, image_var.height);
myImageData = context.getImageData(0, 0, canvas.width, canvas.height);
alert('');
}
image_var.src = "example1.jpeg";
source
share