Home

Awesome

imgdiff

Faster than the fastest in the world pixel-by-pixel image difference tool.

Why?

imgdiff isn't as fast as a tool like this should be and I'm not proud of it, but it is 3X faster than the fastest in the world pixel-by-pixel image difference tool, so maybe you'll find it useful.

Features

It can do everything odiff can. Faster.

Benchmarks

I've tested it on Linux, Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz, 8 cores.

Cypress image 3446 x 10728

CommandMean [s]Min [s]Max [s]Relative
imgdiff images/cypress-1.png images/cypress-2.png output.png1.442 ± 0.0121.4201.4621.00
odiff images/cypress-1.png images/cypress-2.png output.png6.475 ± 0.0926.3006.5834.49

Water image 8400 x 4725

CommandMean [s]Min [s]Max [s]Relative
imgdiff images/water-1.png images/water-2.png output.png1.908 ± 0.00581.8412.0021.00
odiff images/water-1.png images/water-2.png output.png6.016 ± 0.4155.6437.1403.15

Usage

Usage: imgdiff [--threshold THRESHOLD] [--diff-image] [--fail-on-layout] BASE COMPARE OUTPUT

Positional arguments:
  BASE                   Base image.
  COMPARE                Image to compare with.
  OUTPUT                 Output image path.

Options:
  --threshold THRESHOLD, -t THRESHOLD
                         Color difference threshold (from 0 to 1). Less more precise. [default: 0.1]
  --diff-image           Render image to the diff output instead of transparent background. [default: false]
  --fail-on-layout       Do not compare images and produce output if images layout is different. [default: false]
  --help, -h             display this help and exit

Download

You can find pre-built binaries here. imgdiff is written in Go, so there shouldn't be any troubles to compile it for the most of popular platforms.