Does Flickr support CORS? SECURITY ERROR with getImageData

Hello dear community.

I am trying to create extract colors from images obtained from Flickr. All this works very well when I try to process these images in a canvas using getImageData ().

As described in WHATWG, loading an image into the canvas sets a flag, so you cannot bundle it. So my question is, does FLICKR CORS support?

<script type="text/javascript">

    var img= new Image;  
    var canvas = document.getElementById('canvas');
    var ctx = canvas.getContext('2d');  
            var src = "fetched-flickr-image-url";  
        img.crossOrigin = "Anonymous";          
        img.src = src;
        img.onload = function() {    
        ctx.drawImage( img, 0, 0 );  
        var image_data = ctx.getImageData(0, 0, 100, 100);//Throw the Security error        
            }         
          });

</script>

I also tried to process the image, but this is a really difficult process (it took about 4 minutes to process 250 images).

If you have any clues, just ping me.


Enviroment: Mac OSX, HTML5, jQuery

+5
source share
1

; . .

CORS , Access-Control-Allow-Origin: http://www.flickr.com, , .

+4

All Articles