FE/Canvas
[ CANVAS ] ERROR DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
HEON.D
2023. 6. 8. 21:49
크로스 오리진 속성 추가
How to fix getImageData() error The canvas has been tainted by cross-origin data?
My code is working very well on my localhost but it is not working on the site. I got this error from the console, for this line .getImageData(x,y,1,1).data: Uncaught SecurityError: Failed to exe...
stackoverflow.com
let image = new Image();
// image.src = ...;
image.crossOrigin = `Anonymous`;