UNPKG

isomorphic-image-hash

Version:

A dhash library that works in both browsers and Node.js.

17 lines 629 B
/*! isomorphic-image-hash v0.2.0 @license MIT */ //#region src/hash/dhash.d.ts declare const dhashFromImageData: (imageData: ImageDataLike) => string; //#endregion //#region src/utils/distance.d.ts declare const distance: (a: string, b: string) => number; //#endregion //#region src/index.d.ts interface ImageDataLike { width: number; height: number; data: Uint8Array | Uint8ClampedArray; } declare const getImageData: (path: string) => Promise<ImageDataLike>; declare const dhash: (image: string | ImageDataLike) => Promise<string>; //#endregion export { ImageDataLike, dhash, dhashFromImageData, distance, getImageData };