js报错 Uncaught DOMException: Failed to execute ‘getImageData‘ on ‘CanvasRenderingContext2D‘: The can
js报错 Uncaught DOMException: Failed to execute ‘getImageData’ on ‘CanvasRenderingContext2D’: The canvas has been tainted by cross-origin data.在用IDEA时,调用getImageData()报跨域的错误,原因是图片存储在本地时,是默认没有域名的,用getImageData方法时,浏览器会判定为跨域而报错。搜索了很多方法尝试解决,包括:设置时间戳var img