In simple English
This tool compares two pictures and highlights where they look different. It ignores tiny shifts caused by text smoothing and screen rendering. You can use it in your automated tests to check if your web page design changed by mistake. It is very fast and requires no complex setup. It costs nothing to use and runs entirely on your own computer.
What it is
Pixelmatch is a tiny JavaScript library for comparing two images at the pixel level. It detects anti-aliasing and calculates color differences to spot real visual changes without false alarms.
What it is good for
Solo builders who want to catch visual bugs in automated website tests or app screenshots without paying for heavy testing services.
- Runs very fast with no external dependencies.
- Smart enough to ignore minor text smoothing differences.
- Works in both Node.js and web browsers.
- Requires writing a small script to load and save image files.
- Both images must have the exact same pixel dimensions.
- Does not read PNG files on its own without helper libraries.
Manual visual inspection of screenshots
pngjs
- HypothesisWorks/hypothesis9.1k stars
A Python library that generates test inputs and reduces any failure to the smallest example that still fails.
- wntrblm/nox1.6k stars
Runs your tests and other jobs in fresh isolated environments, described in an ordinary Python file.
npm install pixelmatch