πŸ“ˆ GH Trending Explorer 🎲 Surprise me

← all repos

dmtrKovalenko / odiff

git clone https://github.com/dmtrKovalenko/odiff.git v4.5.0 Β· 3mo ago πŸ”₯ on GitHub Trending today

A very fast SIMD-first image comparison library (with nodejs API)

+0
stars, 24h Β· #15,369
+~0
stars, 7 days Β· #15,908
+80
stars, 30 days Β· #6,351
3.3k
β˜… total
119
forks Β· 18 open issues

Star history (as recorded here)

2026-10-20 Β· 3,278 β˜… 2026-10-22 Β· 3,280 β˜…
LanguageZig
LicenseMIT
Created2020-11-04 (5y ago)
Last push9d ago
Watchers18
OwnerUser

Seen on GitHub Trending

  • 2026-10-22 β€” #3 weekly in zig Β· +30 β˜…
  • 2026-10-21 β€” #6 monthly in zig Β· +80 β˜…
  • 2026-10-20 β€” #6 monthly in zig Β· +76 β˜…

GitHub topics

Links

README excerpt
The fastest* (one-thread) pixel-by-pixel image difference tool in the world. 
## Why Odiff?
ODiff is a blazing fast native image comparison tool. Check benchmarks for the results, but it compares the visual difference between 2 images in **milliseconds**. ODiff is designed specifically to handle significantly similar images like screenshots, photos, AI-generated images and many more. ODiff is designed to be portable, fast, and memory efficient.
Originally written in OCaml, currently in Zig with SIMD optimizations for SSE2, AVX2, AVX512, and NEON.
## Demo
| base | comparison | diff |
| ------------------------------ | -------------------------------- | ------------------------------------- |
| | | |
| | | |
| | | |
## Features
- βœ… Cross-format comparison - Yes .jpg vs .png comparison without any problems.
- βœ… Support for `.png`, `.jpeg`, `.jpg`, `.webp`, and `.tiff`
- βœ… Supports comparison of images with different layouts.
- βœ… Anti-aliasing detection
- βœ… Ignoring regions
- βœ… Using YIQ NTSC
 transmission algorithm to determine visual difference.
- βœ… SIMD optimized working for SSE2, AVX2, AVX512, and NEON
- βœ… Controlled memory footprint
- βœ… 100% test coverage and backward compatibility
## Usage
### Basic comparison
Run the simple comparison. Image paths can be one of supported formats, diff output is optional and can only be `.png`.
When diff output is omitted, odiff displays the generated diff directly in terminals that support the kitty graphics protocol (Ghostty, iTerm2, kitty, WezTerm, Warp, wayst, xterm.js, and Konsole).
 [code] 
### Node.js
We also provide direct node.js binding for the `odiff`. Run the `odiff` from nodejs:
 [code] 
## Server mode
Odiff provides a server mode for the long lasting runtime application to reduce a time you have to spend on forking and initializing child process on each odiff call. From node js it works as simply as
 [code] 
For the pure binary usage this is a simple readline stdio protocol with JSON message, here is a simple example
 [code] 
## Using from other frameworks
### Playwright
Just install `playwright-odiff` and simply
 [code] 
More details at playwright-odiff doc
### Cypress
Checkout cypress-odiff, a cypress plugin to add visual regression tests using `odiff-bin`.
### R
odiffr brings odiff to R (on CRAN). Compare images, plots and PDF pages, with testthat snapshot tests, shinytest2 screenshots, batch reports and CI workflows.
 [code] 
### Visual regression services
Argos – Argos is the modern visual testing platform for **websites, mobile apps and design systems**. It uses odiff for comparison. (It became 8x faster with odiff)
LostPixel – Holistic visual testing for your Frontend that allows very easy integration with storybook and uses odiff for comparison
Visual Regression Tracker – Self hosted visual regression service that allows to use odiff as screenshot comparison engine
OSnap – Snapshot testing tool written in OCaml that uses config based declaration to define test and was built by odiff collab