Skip to content

science-periodicals/phash-imagemagick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phash-imagemagick

CircleCI

styled with prettier

Get and compare perceptual hashes (as computed by imagemagick).

Note: this module is auto published to npm on CircleCI. Only run npm version patch|minor|major and let CI do the rest.

Installation

  • Install imagemagick (brew install imagemagick on OSX).

Run:

    npm install

Usage

Get a perceptual hash

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.

Test if 2 perceptual hashes are similar

pHash.eq(obj1, obj2)

where obj1 and obj2 are object obtained from pHash.get.

Test

Run:

    npm test

About

get and compare perceptual hashes (as computed by imagemagick)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published