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 11 years ago
parent
commit
3de4d49ced
  1. 1
      resemble.js

1
resemble.js

@ -108,6 +108,7 @@ URL: https://github.com/Huddle/Resemble.js
function loadImageData( fileData, callback ){ function loadImageData( fileData, callback ){
var fileReader; var fileReader;
var hiddenImage = new Image(); var hiddenImage = new Image();
hiddenImage.setAttribute("crossOrigin", "crossOrigin");
hiddenImage.onload = function() { hiddenImage.onload = function() {

Loading…
Cancel
Save