DOKK / manpages / debian 10 / openimageio-tools / idiff.1.en
IDIFF(1) General Commands Manual IDIFF(1)

idiff - compare two images

idiff [options] image1 image2

The idiff utility is invoked as follows:

idiff [options] image1 image2

Where input1 and input2 are the names of two image files that should be compared. They may be of any format recognized by OpenImageIO (i.e., for which image-reading plugins are available).

If the two input images are not the same resolutions, or do not have the same number of channels, the comparison will return FAILURE immediately and will not attempt to compare the pixels of the two images. If they are the same dimensions, the pixels of the two images will be compared, and a report will be printed including the mean and maximum error, how many pixels were above the warning and failure thresholds, and whether the result is PASS, WARNING, or FAILURE. For example:

$ idiff a.jpg b.jpg
Comparing "a.jpg" and "b.jpg"

Mean error = 0.00450079
RMS error = 0.00764215
Peak SNR = 42.3357
Max error = 0.254902 @ (700, 222, B)
574062 pixels (82.1%) over 1e-06
574062 pixels (82.1%) over 1e-06 FAILURE

The "mean error" is the average difference (per channel, per pixel). The "max error" is the largest difference in any pixel channel, and will point out on which pixel and channel it was found. It will also give a count of how many pixels were above the warning and failure thresholds.

The metadata of the two images (e.g., the comments) are not currently compared; only differences in pixel values are taken into consideration.

For a complete description, see /usr/share/doc/openimageio-doc/openimageio.pdf.gz.

Print help message
Verbose status messages
Compare all subimages/miplevels

Failure threshold difference (0.000001)
Allow this percentage of failures (0)
Fail if any one pixel exceeds this error (infinity)
Warning threshold difference (0.00001)
Allow this percentage of warnings (0)
Warn if any one pixel exceeds this error (infinity)
Perform perceptual (rather than numeric) comparison

Output difference image
Output image only if nonzero difference
Output image of absolute value, not signed difference
Scale the output image by this factor

iconvert(1), igrep(1), iinfo(1), iv(1), maketx(1), oiiotool(1).

OpenImageIO was written by Larry Gritz and the other authors and contributors.

This manual page was written by IRIE Shinsuke <irieshinsuke@yahoo.co.jp>, for the Debian project (and may be used by others).

December 11, 2012