MCPcopy
hub / github.com/jimp-dev/jimp / pHash

Function pHash

plugins/plugin-hash/src/index.ts:37–40  ·  view source on GitHub ↗

* Calculates the perceptual hash * @returns the perceptual hash * @example * ```ts * import { Jimp } from "jimp"; * * const image = await Jimp.read("test/image.png"); * * image.hash(); * ```

(image: I)

Source from the content-addressed store, hash-verified

35 * ```
36 */
37 pHash<I extends JimpClass>(image: I) {
38 const pHash = new ImagePHash();
39 return pHash.getHash(image);
40 },
41
42 /**
43 * Generates a perceptual hash of the image <https://en.wikipedia.org/wiki/Perceptual_hashing>. And pads the string. Can configure base.

Callers

nothing calls this directly

Calls 1

getHashMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…