get and compare perceptual hashes (as computed by imagemagick)
npm install phash-imagemagick
Get and compare perceptual hashes (as computed by imagemagick).
- Install imagemagick (``brew install imagemagick` on OSX).
Run:
npm install
`
var pHash = require('phash-imagemagick');
pHash.get('image.png', function(err, data) {
console.log(data.pHash);
});
`
pHash.get(input, callback)
where input is a filePath or a readable stream.
pHash.eq(obj1, obj2)
where obj1 and obj2 are object obtained from pHash.get`.
Run:
npm test