'Tainted canvases may not be exported' when using drawImage [duplicate]
问题 This question already has an answer here : Canvas image crossplatform insecure error (1 answer) Closed 3 years ago . When trying to draw an image onto a canvas, and then saving the canvas to an image, I get the following error: Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported var picture = new Image(); picture.src = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Smiley.svg/800px-Smiley.svg.png"; var canvas =