From 3de4d49ced78577ea7a924b13b95800f84bfa46e Mon Sep 17 00:00:00 2001 From: Alex S Date: Mon, 2 Jun 2014 16:17:03 +0200 Subject: [PATCH] Add support for cross origin Both side of a cross origin request should be aware of it. It is done on the client side through a crossOrigin attribute on the image. http://stackoverflow.com/questions/12947361/cors-settings-for-images-in-canvas https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image --- resemble.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resemble.js b/resemble.js index d82bd4e..a09934b 100644 --- a/resemble.js +++ b/resemble.js @@ -108,6 +108,7 @@ URL: https://github.com/Huddle/Resemble.js function loadImageData( fileData, callback ){ var fileReader; var hiddenImage = new Image(); + hiddenImage.setAttribute("crossOrigin", "crossOrigin"); hiddenImage.onload = function() { @@ -597,4 +598,4 @@ URL: https://github.com/Huddle/Resemble.js return this; }; -}(this)); \ No newline at end of file +}(this));