0

This is my problem: I have 2 canvases C1 and C2 and 3 <img> tags I1, I2, and I3.

First, I load I1 into C1.
Next, I set an image into C1 and then I2.src = C1.toDataURL(); (PROBLEM)
After, I load I2 into C2.
Finally, I set image into C1 and then I3.src = C2.toDataURL(); (PROBLEM)

Only in Safari the browser shows in the console the message:

Cross-origin image load denied by Cross-Origin Resource Sharing policy.

I have tried assign the attribute crossOrigin = '' and crossOrigin = 'anonymous' but it isn't working.

Someone can help me please?

Thanks!

Kirby
  • 15,127
  • 10
  • 89
  • 104
Dani
  • 35
  • 7
  • If you want a real answer show some real code - are any of the images on a different domain than the page itself? – Jaromanda X Oct 08 '15 at 08:13
  • 1
    To use cross origin image, not only setting the `crossOrigin = 'anonymous'` is enough but also the server should support cross origin policy by providing the following headers on its response: `Access-Control-Allow-Origin: `. Please check that out first. If you share the code that you have tried will be more helpful. – Kesavamoorthi Oct 09 '15 at 06:05
  • also see http://stackoverflow.com/questions/17990678/cross-origin-image-load-denied-by-cross-origin-resource-sharing-policy – Kirby Nov 24 '15 at 22:52

0 Answers0