🖼 Image Hash
Generate perceptual hashes for PNG or JPEG images
💾 Installation
The package is on the NPM registry as @lolpants/image-hash
. Simply install it with your NPM client of choice.
🔧 Usage
import { imageHash } from '@lolpants/image-hash'
// Resolve
const imageBuffer = fs.readFileSync('./example.png')
const hash = imageHash(imageBuffer)
// => ffee6f66ea356e6c6d5...
Only PNG or JPEG type images can be used.