#297 Update README

master
fragphace 10 years ago
parent 631beec44f
commit c7aee325bd
  1. 7
      README.md
  2. 1
      test/utils.js

@ -502,7 +502,7 @@ Currently `gm.compare` only accepts file paths.
gm.compare(path1, path2 [, options], callback)
```js
gm.compare('/path/to/image1.jpg', '/path/to/another.png', function (err, isEqual, equality, raw) {
gm.compare('/path/to/image1.jpg', '/path/to/another.png', function (err, isEqual, equality, raw, path1, path2) {
if (err) return handle(err);
// if the images were considered equal, `isEqual` will be true, otherwise, false.
@ -512,7 +512,10 @@ gm.compare('/path/to/image1.jpg', '/path/to/another.png', function (err, isEqual
console.log('Actual equality: %d', equality);
// inspect the raw output
console.log(raw)
console.log(raw);
// print file paths
console.log(path1, path2);
})
```

@ -4,6 +4,7 @@ var assert = require('assert')
module.exports = function (_, dir, finish, gm) {
assert.equal('function', typeof gm.utils.escape);
assert.equal('function', typeof gm.utils.unescape);
finish();
}

Loading…
Cancel
Save