master 1.14.0
Jonathan Ong 11 years ago
parent 1fa04664ba
commit 13ba1dc11b
  1. 13
      History.md
  2. 2
      package.json
  3. 31
      test/compareImageMagick.js

@ -1,33 +1,46 @@
1.14.0 / 2013-12-04
===================
* added; compare method for imagemagick (longlho)
1.13.3 / 2013-10-22
===================
* fixed; escape diffOptions.file in compare (dwabyick)
1.13.2 / 2013-10-18
===================
* fixed; density is a setting not an operator
1.13.1 / 2013-09-15
===================
* added; boolean for % crop
1.13.0 / 2013-09-07
===================
* added; morph more than two images (overra)
1.12.2 / 2013-08-29
===================
* fixed; fallback to through in node 0.8
1.12.1 / 2013-08-29 (unpublished)
===================
* refactor; replace through with stream.PassThrough
1.12.0 / 2013-08-27
===================
* added; diff image output file (chenglou)
1.11.1 / 2013-08-17
===================
* added; proto.selectFrame(#)
* fixed; getters should not ignore frame selection

@ -1,7 +1,7 @@
{
"name": "gm",
"description": "GraphicsMagick and ImageMagick for node.js",
"version": "1.13.3",
"version": "1.14.0",
"author": "Aaron Heckmann <aaron.heckmann+github@gmail.com>",
"keywords": [
"graphics",

@ -1,31 +0,0 @@
var assert = require('assert');
var fs = require('fs');
module.exports = function (gm, dir, finish, GM) {
// Same image
gm.compare(dir + '/original.jpg', dir + '/original.png', function(err, same) {
if (err) return finish(err);
if (!same) return finish(new Error('Compare should be the same!'));
// Create a new noisy image
gm.noise(0.3).write(dir + '/noise3.png', function (err) {
if (err) return finish(err);
var options = {
highlightColor: 'yellow',
file: dir + '/diff.png'
};
// Compare these images and write to a file.
gm.compare(dir + '/original.jpg', dir + '/noise3.png', options, function(err) {
if (err) return finish(err);
fs.exists(options.file, function(exists) {
if (exists) finish();
else finish(new Error('Diff file does not exist.'));
});
});
})
});
};
Loading…
Cancel
Save