# perceptual-hash

> Generate content-based image hashes on Node.js.

Latest version **0.1.1** (published 2023-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install perceptual-hash
pnpm add perceptual-hash
yarn add perceptual-hash
bun add perceptual-hash
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-04-13 |
| First published | 2023-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 2 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Hizkia Ray |
| Maintainers | ray_1337 |
| Keywords | hash, hashing, perceptual |

## Links

- npm: https://www.npmjs.com/package/perceptual-hash
- Repository: https://github.com/ray-1337/perceptual-hash
- Homepage: https://github.com/ray-1337/perceptual-hash#readme
- Issues: https://github.com/ray-1337/perceptual-hash/issues
- npm.io page: https://npm.io/package/perceptual-hash

## Dependencies (2)

- [@canvas/image](https://npm.io/package/@canvas/image.md) ^1.0.1
- [blockhash-core](https://npm.io/package/blockhash-core.md) ^0.1.0

## 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

- 0.1.1 (latest) — 2023-04-13
- 0.1.0 — 2023-04-13

## README

# Perceptual Hash
Generate content-based image hashes on Node.js.

## Installation
```
pnpm add perceptual-hash
npm add perceptual-hash
yarn add perceptual-hash
```

## Usage
```ts
import { generateHash } from "perceptual-hash";

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

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

## License
[MIT](LICENSE)

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