Browse Source

tidy and bump

pull/25/head v1.1.2
James Cryer 10 years ago
parent
commit
4b2766cd0c
  1. 2
      package.json
  2. 12
      resemble.js

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "resemblejs", "name": "resemblejs",
"version": "1.1.1", "version": "1.1.2",
"description": "Image analysis and comparison with HTML5", "description": "Image analysis and comparison with HTML5",
"main": "resemble.js", "main": "resemble.js",
"repository": { "repository": {

12
resemble.js

@ -110,7 +110,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.setAttribute("crossOrigin", "crossOrigin");
hiddenImage.onload = function() { hiddenImage.onload = function() {
@ -132,11 +132,11 @@ URL: https://github.com/Huddle/Resemble.js
if (typeof fileData === 'string') { if (typeof fileData === 'string') {
hiddenImage.src = fileData; hiddenImage.src = fileData;
} else if (typeof fileData.data !== 'undefined' } else if (typeof fileData.data !== 'undefined'
&& typeof fileData.width === 'number' && typeof fileData.width === 'number'
&& typeof fileData.height === 'number') { && typeof fileData.height === 'number') {
images.push(fileData); images.push(fileData);
callback(fileData, fileData.width, fileData.height); callback(fileData, fileData.width, fileData.height);
} else { } else {
fileReader = new FileReader(); fileReader = new FileReader();
fileReader.onload = function (event) { fileReader.onload = function (event) {
hiddenImage.src = event.target.result; hiddenImage.src = event.target.result;

Loading…
Cancel
Save