imghash
Version:
Image perceptual hash calculation for node
15 lines (12 loc) • 470 B
TypeScript
import { ImageData } from 'blockhash-core';
declare function hash(filepath: string, bits?: number | null, format?: string): Promise<string>;
declare function hashRaw(data: ImageData, bits: number): string;
declare function hexToBinary(s: string): string;
declare function binaryToHex(s: string): string;
declare const api: {
hash: typeof hash;
hashRaw: typeof hashRaw;
hexToBinary: typeof hexToBinary;
binaryToHex: typeof binaryToHex;
};
export = api;