Skip to content

Instantly share code, notes, and snippets.

@simple10
Last active December 19, 2015 23:19
Show Gist options
  • Save simple10/6033969 to your computer and use it in GitHub Desktop.
Save simple10/6033969 to your computer and use it in GitHub Desktop.
PerceptualDiff command line tool for diff'ing images.

Fun with visual diff'ing!

http://pdiff.sourceforge.net/

# OSX
$ brew install perceptualdiff

$ perceptualdiff screen1.png screen2.png -verbose -output diff.ppm -colorfactor 0.0

Field of view is 45.000000 degrees
Threshold pixels is 100 pixels
The Gamma is 2.200000
The Display's luminance is 100.000000 candela per meter squared
Converting RGB to XYZ
Constructing Laplacian Pyramids
Performing test
FAIL: Images are visibly different
648 pixels are different

The diff.ppm file will contain the visual diff between screen1.png and screen2.png.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment