Installation
npm install --save @types/pixelmatch
Summary
This package contains type definitions for pixelmatch (https://github.com/mapbox/pixelmatch#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pixelmatch.
declare function Pixelmatch(
img1: Buffer | Uint8Array | Uint8ClampedArray,
img2: Buffer | Uint8Array | Uint8ClampedArray,
output: Buffer | Uint8Array | Uint8ClampedArray | null,
width: number,
height: number,
options?: Pixelmatch.PixelmatchOptions,
): number;
declare namespace Pixelmatch {
type RGBTuple = [number, number, number];
interface PixelmatchOptions {
readonly threshold?: number | undefined;
readonly includeAA?: boolean | undefined;
alpha?: number | undefined;
aaColor?: RGBTuple | undefined;
diffColor?: RGBTuple | undefined;
diffColorAlt?: RGBTuple | undefined;
diffMask?: boolean | undefined;
}
}
export = Pixelmatch;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/node
Credits
These definitions were written by Oleg Repin, Piotr Błażejewicz, and Damian Frizzi.