Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to export image #44

Open
venkat1212 opened this issue Jun 3, 2016 · 1 comment
Open

unable to export image #44

venkat1212 opened this issue Jun 3, 2016 · 1 comment

Comments

@venkat1212
Copy link

I am integrated annotate but whenever I am trying to execute export, it will cause below error,

"djaodjin-annotate.js:740 Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported."

Can anyone please help on that really appreciate.

@girikuncoro
Copy link

Are you rendering image to canvas from a remote url? I was having the same issue when I try to annotate image from http://placehold.it/700x300 url instead of the image file from my local. This is likely to be cors issue, so what you have to do is add crossOrigin attribute, to be exact below snippet:

self.img.crossOrigin = 'Anonymous'

to the line before the self.img.src = image.path here. This solved my issue and I'm able to annotate image from remote source.

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

No branches or pull requests

2 participants