isomorphic-image-hash
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

isomorphic-image-hash

A dhash library that works in both browsers and Node.js.

Usage

import { dhash, distance } from 'isomorphic-image-hash'

// Get the image hash value.
const hash = await dhash('path/to/images/mandrill.jpg')

console.log(hash) // '0001111110101011111010100110100001101000001110000101001001101000'

// Get the Hamming distance of hash values.
distance(hash, otherHash)

Readme

Keywords

Package Sidebar

Install

npm i isomorphic-image-hash

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

44.6 kB

Total Files

15

Last publish

Collaborators

  • imasanari