diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/README.md b/README.md index a40312f..4e71e56 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ var diff = resemble(file).compareTo(file2).ignoreColors().onComplete(function(da }); ``` +Scale second image to dimensions of the first one: +```javascript +//diff.useOriginalSize(); +diff.scaleToSameSize(); +``` + You can also change the comparison method after the first analysis. ```javascript @@ -53,6 +59,7 @@ You can also change the comparison method after the first analysis. diff.ignoreAntialiasing(); ``` + And change the output display style. ```javascript diff --git a/bower.json b/bower.json index 8bbce3a..7753009 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "resemblejs", "main": "resemble.js", - "version": "1.2.1", + "version": "2.2.0", "homepage": "https://github.com/Huddle/Resemble.js", "authors": [ "James Cryer " diff --git a/demoassets/main.js b/demoassets/main.js index dfa5b89..f72e8a5 100644 --- a/demoassets/main.js +++ b/demoassets/main.js @@ -44,6 +44,7 @@ $(function(){ $('#red').css('width',data.red+'%'); $('#green').css('width',data.green+'%'); $('#blue').css('width',data.blue+'%'); + $('#alpha').css('width',data.alpha+'%'); $('#brightness').css('width',data.brightness+'%'); }); @@ -115,6 +116,14 @@ $(function(){ resembleControl.ignoreAntialiasing(); } else + if($this.is('#same-size')){ + resembleControl.scaleToSameSize(); + } + else + if($this.is('#original-size')){ + resembleControl.useOriginalSize(); + } + else if($this.is('#pink')){ resemble.outputSettings({ errorColor: { diff --git a/index.html b/index.html index f69325b..98585a1 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,7 @@