Browse Source

Merge branch 'master' of https://github.com/Shadowblazen/Resemble.js into Shadowblazen-master

pull/34/head
James Cryer 10 years ago
parent
commit
b304421eb3
  1. 8
      resemble.js

8
resemble.js

@ -59,6 +59,9 @@ URL: https://github.com/Huddle/Resemble.js
var largeImageThreshold = 1200;
var httpRegex = /^https?:\/\//;
var documentDomainRegex = new RegExp('^https?://' + document.domain);
_this['resemble'] = function( fileData ){
var data = {};
@ -131,7 +134,10 @@ URL: https://github.com/Huddle/Resemble.js
function loadImageData( fileData, callback ){
var fileReader;
var hiddenImage = new Image();
hiddenImage.setAttribute("crossOrigin", "crossOrigin");
if (httpRegex.test(fileData) && !documentDomainRegex.test(fileData)) {
hiddenImage.setAttribute('crossorigin', 'anonymous');
}
hiddenImage.onload = function() {

Loading…
Cancel
Save