0.0.13 • Published 2 months ago

img-hasher v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Image Hasher

A fast image hash generator and hamming distance calculator using multiple algorithms

Installation

npm install img-hasher

Usage

Get Hash Of an Image

const { getHash } = require('img-hasher');
const hash = await getHash('https://example.com/image.jpg');

Get Hash Distance Between Two Images

const { hammingDistance } = require('img-hasher');
const distance = await hammingDistance('https://example.com/image1.jpg', 'https://example.com/image2.jpg');

Get Hash Distance Between Two Hashes

const { getHash, hammingDistanceFromHash } = require('img-hasher');
const hash1 = await getHash('https://example.com/image1.jpg');
const hash2 = await getHash('https://example.com/image2.jpg');
const distance = hammingDistanceFromHash(hash1, hash2);

Algorithms

  • Mean
  • Gradient
  • VertGradient
  • DoubleGradient
  • BlockHash
0.0.12

2 months ago

0.0.13

2 months ago

0.0.11

5 months ago

0.0.10

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.0

12 months ago