Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@bokuweb/pixelmatch-wasm
Advanced tools
A pixel-level image comparison library powered by wasm and SIMD feature, originally created to compare screenshots in tests.
A pixel-level image comparison library powered by wasm and SIMD feature, originally created to compare screenshots in tests.
This library is ported from mapbox/pixelmatch
npm i @bokuweb/pixelmatch-wasm
import { pixelmatch } from "@bokuweb/pixelmatch-wasm";
pixelmatch(img1, img2, 800, 600, { threshold: 0.1 });
img1
, img2
— Image data of the images to compare. Note: image dimensions must be equal.width
, height
— Width and height of the images. Note that all three images need to have the same dimensions.options
is an object literal with the following properties:
type PixelmatchOptions = {
includeAntiAlias: boolean;
threshold: number;
diffColor: [number, number, number, number];
antiAliasedColor: [number, number, number, number];
};
threshold
— Matching threshold, ranges from 0
to 1
. Smaller values make the comparison more sensitive. 0.1
by default.includeAntiAlias
— If true
, disables detecting and ignoring anti-aliased pixels. false
by default.diffColor
— The color of differing pixels in the diff output in [R, G, B, A]
format. [255, 119, 119, 255]
by default.antiAliasedColor
— The color of anti-aliased pixels in the diff output in [R, G, B, A]
format. [243, 156, 18, 255]
by default.FAQs
A pixel-level image comparison library powered by wasm and SIMD feature, originally created to compare screenshots in tests.
The npm package @bokuweb/pixelmatch-wasm receives a total of 7 weekly downloads. As such, @bokuweb/pixelmatch-wasm popularity was classified as not popular.
We found that @bokuweb/pixelmatch-wasm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.