Gathering detailed insights and metrics for @types/pixelmatch
Gathering detailed insights and metrics for @types/pixelmatch
Gathering detailed insights and metrics for @types/pixelmatch
Gathering detailed insights and metrics for @types/pixelmatch
The repository for high quality TypeScript type definitions.
npm install @types/pixelmatch
Typescript
Module System
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
50,040 Stars
89,741 Commits
30,435 Forks
640 Watchers
6 Branches
9,957 Contributors
Updated on Jul 15, 2025
Latest Version
5.2.6
Package Id
@types/pixelmatch@5.2.6
Unpacked Size
7.68 kB
Size
2.39 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
npm install --save @types/pixelmatch
This package contains type definitions for pixelmatch (https://github.com/mapbox/pixelmatch#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pixelmatch.
1/// <reference types="node" />
2
3declare function Pixelmatch(
4 /** Image data of the first image to compare. Note: image dimensions must be equal. */
5 img1: Buffer | Uint8Array | Uint8ClampedArray,
6 /** Image data of the second image to compare. Note: image dimensions must be equal. */
7 img2: Buffer | Uint8Array | Uint8ClampedArray,
8 /** Image data to write the diff to, or null if don't need a diff image. */
9 output: Buffer | Uint8Array | Uint8ClampedArray | null,
10 /** Width of the images. Note that all three images need to have the same dimensions. */
11 width: number,
12 /** Height of the images. Note that all three images need to have the same dimensions. */
13 height: number,
14 /** Options. */
15 options?: Pixelmatch.PixelmatchOptions,
16): number;
17
18declare namespace Pixelmatch {
19 type RGBTuple = [number, number, number];
20
21 interface PixelmatchOptions {
22 /**
23 * Matching threshold, ranges from 0 to 1. Smaller values make the comparison more sensitive.
24 * @default 0.1
25 */
26 readonly threshold?: number | undefined;
27 /**
28 * If true, disables detecting and ignoring anti-aliased pixels.
29 * @default false
30 */
31 readonly includeAA?: boolean | undefined;
32 /**
33 * Blending factor of unchanged pixels in the diff output.
34 * Ranges from 0 for pure white to 1 for original brightness
35 * @default 0.1
36 */
37 alpha?: number | undefined;
38 /**
39 * The color of anti-aliased pixels in the diff output.
40 * @default [255, 255, 0]
41 */
42 aaColor?: RGBTuple | undefined;
43 /**
44 * The color of differing pixels in the diff output.
45 * @default [255, 0, 0]
46 */
47 diffColor?: RGBTuple | undefined;
48 /**
49 * An alternative color to use for dark on light differences to differentiate between "added" and "removed" parts.
50 * If not provided, all differing pixels use the color specified by `diffColor`.
51 * @default null
52 */
53 diffColorAlt?: RGBTuple | undefined;
54 /**
55 * Draw the diff over a transparent background (a mask), rather than over the original image.
56 * Will not draw anti-aliased pixels (if detected)
57 * @default false
58 */
59 diffMask?: boolean | undefined;
60 }
61}
62
63export = Pixelmatch;
64
These definitions were written by Oleg Repin, Piotr Błażejewicz, and Damian Frizzi.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More