Browse Source

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
pull/20/head
Alex S 10 years ago
parent
commit
3de4d49ced
  1. 3
      resemble.js

3
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));
}(this));

Loading…
Cancel
Save