Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

can not load cross-origin data with canvas.getImageData() #4

Open
RachelYun opened this issue Apr 29, 2014 · 1 comment
Open

can not load cross-origin data with canvas.getImageData() #4

RachelYun opened this issue Apr 29, 2014 · 1 comment

Comments

@RachelYun
Copy link

When I load image from other site(I have to do that), canvas throw Error like " Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': the canvas has been tainted by cross-origin data. ",
after I do some research , I know it should not put image.src = URL before canvas.drawImage,but computeSegmentation need real imageData.

What can I do with this issue??

P.S. I must use this site image and can not save it on local

@kyamagu
Copy link
Owner

kyamagu commented Apr 29, 2014

This is a security feature of web browsers and there is no simple workaround unless CORS is enabled in the image server.

Kota

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants