phash-imagemagick

1.0.1 • Public • Published

phash-imagemagick

CircleCI

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

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

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i phash-imagemagick

    Weekly Downloads

    15

    Version

    1.0.1

    License

    apache-v2

    Last publish

    Collaborators

    • scienceai
    • sballesteros