The Tained canvas
suggest changeWhen adding content from sources outside your domain, or from the local file system the canvas is marked as tainted. Attempt to access the pixel data, or convert to a dataURL will throw a security error.
vr image = new Image();
image.src = "file://myLocalImage.png";
image.onload = function(){
ctx.drawImage(this,0,0);
ctx.getImageData(0,0,canvas.width,canvas.height); // throws a security error
}
This example is just a stub to entice someone with a detailed understanding elaborate.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents