Diffing with CALAMARI

 

How CALAMARI diffs files

A "diff" is a comparison of two files that are similar in many ways but have some significant difference.  Since images are simply large arrays of differently-colored pixels, CALAMARI expresses diffs by matching each pixel in one image with the corresponding pixel in another image of the same size, and comparing the two.  The pairs of pixels which are different colors comprise the "diff" between the two images, as illustrated here:

 

Calling CALAMARI from the command line

To diff two files in CALAMARI, call calamari with the names of the two files as arguments:

calamari image1.png image2.png

 

The CALAMARI diff toolbar

Diff stencil: Toggles a "stencil" which obscures the pixels that are identical between the two images, leaving only the diffs.  The threshold at which two pixels are considered "identical" can be adjusted in the Color Options dialog.

Color Options: Opens a dialog that allows you to set the color of the stencil and the threshold at which the stencil feature considers colors to be identical.  This dialog also allows you to set additional options which are only relevant when merging files, and will not be discussed here.

Zoom: By default, the diff view will automatically stretch to fit the window.  By unchecking that option, you can specify the exact scale at which the image will be displayed.

 

The CALAMARI diff window

Source images: These are the two images that were passed to CALAMARI on the command line.  Clicking on either of these images will set the diff view to display that image.  If the Zoom is set to a greater size than will fit in the window, the source images will remain scaled to fit the window, and will indicate what portion of the image is currently visible in the diff view.

Diff slider: Moving this slider allows you to fade the diff view between the two source images.

Diff view: The diff view displays either source image or a blend between the two, depending on what the diff slider is currently set to.  If the Diff stencil option is currently enabled, non-differing pixels will be obscured by the stencil.