A Python testing framework that makes it easy to write small tests and scales to complex functional testing for applications and libraries.
dmtrKovalenko/odiff
A fast, SIMD-optimized command-line tool and Node.js library that compares two images pixel by pixel and produces a diff image.
Open-source alternative to:ImageMagick
- Stars
- 3,274
- Forks
- 118
- Open issues
- 16
- Last commit
- 6 days ago
What is it?
odiff compares the visual difference between two images, pixel by pixel, and can write the highlighted differences to a PNG diff file. It is aimed at visual regression testing, where screenshots from a test run are checked against stored baselines, but it works for any pair of images such as photos or AI-generated output.
The tool is written in Zig and uses SIMD instructions (SSE2, AVX2, AVX512, and NEON) for speed. It accepts PNG, JPEG, WebP, and TIFF inputs, including comparisons across formats, and can handle images with different layouts. Options cover color thresholds, anti-aliasing detection, ignored rectangular regions, and reporting of differing lines and columns.
Besides the standalone binary, odiff ships a Node.js API (package odiff-bin) with a persistent server mode that avoids spawning a process for each comparison. Integrations exist for Playwright, Cypress, and R, and several visual testing services use it as their comparison engine.
Key features
- 01Compares PNG, JPEG, WebP, and TIFF images, including across formats.
- 02Uses SIMD optimizations for SSE2, AVX2, AVX512, and NEON.
- 03Detects anti-aliased pixels and can ignore specified regions.
- 04Supports images with different layouts and reports differing line and column indexes.
- 05Provides a Node.js API and a persistent server mode.
Use cases
- Visual regression testing of web pages in CI pipelines.
- Comparing Playwright or Cypress screenshots against stored baselines.
- Checking whether generated images or renders changed between builds.
Topics
FAQ
- What is odiff?
- A fast, SIMD-optimized command-line tool and Node.js library that compares two images pixel by pixel and produces a diff image. odiff compares the visual difference between two images, pixel by pixel, and can write the highlighted differences to a PNG diff file. It is aimed at visual regression testing, where screenshots from a test run are checked against stored baselines, but it works for any pair of images such as photos or AI-generated output.
- Is odiff free to use? What license does it have?
- odiff is open source under the MIT license. Check the license terms before using it in commercial products.
- Is odiff still maintained?
- Actively maintained. The last commit to odiff was on Oct 13, 2026.
- What can I use odiff for?
- Visual regression testing of web pages in CI pipelines. Comparing Playwright or Cypress screenshots against stored baselines. Checking whether generated images or renders changed between builds.
- Where can I get odiff?
- The source code and installation instructions are on GitHub: https://github.com/dmtrKovalenko/odiff
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Swagger UI renders interactive API documentation in the browser from an OpenAPI/Swagger specification file.
Natural-language driven Android automation for AI coding assistants and test suites, running on real phones or emulators.
An end-to-end testing framework for web and mobile apps that lets you describe test goals in natural language and drive the app with an agent.
A unified web development toolchain that bundles Vite, Vitest, Oxlint, Oxfmt, Rolldown and tsdown behind one `vp` CLI with runtime and package manager management.
A TypeScript re-implementation of the ADB client that runs in Chromium browsers, Node.js and Electron, connecting to Android devices over WebUSB.