wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

Image crop function crossOrigin issue #210

Open deepaksm1 opened 8 years ago

deepaksm1 commented 8 years ago

I am trying to crop image in my image crop control. I am using canvas getImageData function to get partial image data,

It is throwing "Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data."

If I change create Image element code in fayde.js then it works fine.

BitmapSource.prototype.createElement = function () {
                    var image = new Image();
                    image.setAttribute('crossOrigin', 'anonymous');
                    return image;
                };

Can you provide some solution on this in next fayde release?