{"repo":"mapbox/pixelmatch","free":true,"listed":false,"github":"https://github.com/mapbox/pixelmatch","clone":"git clone https://github.com/mapbox/pixelmatch.git","description":"The smallest, simplest and fastest JavaScript pixel-level image comparison library","language":"JavaScript","stars":6918,"topics":["image-comparison","testing-tools","diff"],"license":"ISC","category":"dev-tools","readme_excerpt":"pixelmatch A small, simple and fast JavaScript pixel-level image comparison library , originally created to compare screenshots in tests. Features accurate anti-aliased pixels detection and perceptual color difference metrics. Inspired by Resemble.js and Blink-diff. Unlike these libraries, pixelmatch is just a few hundred lines of code , has no dependencies , and works on raw typed arrays of image data, so it's very fast and can be used in both Node and browsers. Implements ideas from the following papers: - A perceptual color space for image processing (2020, Björn Ottosson) — the OKLab color space used for color difference. - Distance metrics for very large color differences (2019, Saeideh Abasi et al.) — the OKLab HyAB metric used to compare colors. - Anti-aliased pixel and intensity slope detector (2009, Vytautas Vyšniauskas) Demo Example output expected actual diff --- --- --- API pixelmatch(img1, img2, output, width, height[, options]) - img1 , img2 — Image data of the images to compare ( Buffer , Uint8Array or Uint8ClampedArray ). Note: image dimensions must be equal. - output — Image data to write the diff to, or null if don't need a diff image. - 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: - threshold — Matching threshold, ranges from 0 to 1 . Smaller values make the comparison more sensitive. 0.1 by default. - includeAA — If true , disables d","default_branch":null,"files":null,"tree":[],"storefront":"/r/mapbox","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mapbox/pixelmatch/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}