Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 460 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 460 Bytes

Perceptual Hash

Generate content-based image hashes on Node.js.

Installation

pnpm add perceptual-hash
npm add perceptual-hash
yarn add perceptual-hash

Usage

import { generateHash } from "perceptual-hash";

const imageHash = await generateHash(new Uint8Array(Buffer.from(imageBufferHere)));
// => 0773063f063f36070e...

API

generateHash(Uint8Array, bits?: number); // => Promise<string | null>

License

MIT