# phash-imagemagick

> get and compare perceptual hashes (as computed by imagemagick)

Latest version **1.0.1** (published 2018-01-27) · apache-v2 license · 0 weekly downloads

## Install

```sh
npm install phash-imagemagick
pnpm add phash-imagemagick
yarn add phash-imagemagick
bun add phash-imagemagick
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-01-27 |
| First published | 2015-01-28 |
| Weekly downloads | 0 |
| License | apache-v2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | sebastien ballesteros |
| Maintainers | scienceai, sballesteros |
| Keywords | perceptual, hash, phash |

## Links

- npm: https://www.npmjs.com/package/phash-imagemagick
- Repository: https://github.com/standard-analytics/phash-imagemagick
- Issues: https://github.com/standard-analytics/phash-imagemagick/issues
- npm.io page: https://npm.io/package/phash-imagemagick

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-01-27
- 1.0.0 — 2016-03-01
- 0.3.0 — 2015-10-30
- 0.2.0 — 2015-01-29
- 0.1.0 — 2015-01-29
- 0.0.0 — 2015-01-28

## README

# phash-imagemagick

[![CircleCI](https://circleci.com/gh/science-periodicals/phash-imagemagick.svg?style=svg)](https://circleci.com/gh/science-periodicals/phash-imagemagick)

[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

Get and compare [perceptual hashes](http://en.wikipedia.org/wiki/Perceptual_hashing) ([as computed by imagemagick](http://www.fmwconcepts.com/misc_tests/perceptual_hash_test_results_510/index.html)).

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](http://www.imagemagick.org/) (```brew install imagemagick``` on OSX).

Run:

```sh
    npm install
```

## Usage


### Get a perceptual hash

```js
var pHash = require('phash-imagemagick');

pHash.get('image.png', function(err, data) {
  console.log(data.pHash);
});

```

```js
pHash.get(input, callback)
```

where `input` is a filePath or a readable stream.


### Test if 2 perceptual hashes are similar

```js
pHash.eq(obj1, obj2)
```

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

## Test

Run:

```sh
    npm test
```

---
_Source: https://npm.io/package/phash-imagemagick · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
