I am using color thief js locally and using remote image URL to find the color, I am getting this error Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data. I'm getting this error and then not getting colors obviously but I see images loaded on canvas and that is visible on the body.
Though I'm handling error in my code, ColorThief leaves the canvas on the body on an error. please make sure on the error you clear the DOM or memory used while finding color.
It would be better if you put a class or something to identify the canvas created by ColorThief. so it would be possible to tweak ColorThief canvas to hide on error or something.
Hello,
I am using color thief js locally and using remote image URL to find the color, I am getting this error
Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
I'm getting this error and then not getting colors obviously but I see images loaded on canvas and that is visible on the body.Though I'm handling error in my code, ColorThief leaves the canvas on the body on an error. please make sure on the error you clear the DOM or memory used while finding color.
It would be better if you put a class or something to identify the canvas created by ColorThief. so it would be possible to tweak ColorThief canvas to hide on error or something.