https://github.com/luludotdev/image-hash
Generate perceptual hashes for PNG or JPEG images
https://github.com/luludotdev/image-hash
Last synced: 3 months ago
JSON representation
Generate perceptual hashes for PNG or JPEG images
- Host: GitHub
- URL: https://github.com/luludotdev/image-hash
- Owner: luludotdev
- License: mit
- Created: 2019-05-27T05:06:05.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-15T15:50:44.000Z (almost 3 years ago)
- Last Synced: 2025-10-22T05:20:28.980Z (7 months ago)
- Language: TypeScript
- Homepage: https://npm.im/@luludev/image-hash
- Size: 2.55 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🖼 Image Hash

[](https://www.npmjs.com/package/@luludev/image-hash)
[](https://www.npmjs.com/package/@luludev/image-hash)
> Generate perceptual hashes for PNG or JPEG images
## 💾 Installation
The package is on the NPM registry as `@luludev/image-hash`. Simply install it with your NPM client of choice.
## 🔧 Usage
```ts
import { imageHash } from '@luludev/image-hash'
// Resolve
const imageBuffer = fs.readFileSync('./example.png')
const hash = imageHash(imageBuffer)
// => ffee6f66ea356e6c6d5...
```
Only PNG or JPEG type images can be used.