A utility for determining whether two images are the same. Two images are considered to be the same if one has been obtained from the other by a small edit, a resizing, a change of saturation, or a change of exposition.
imgcmp IMG1_PATH IMG2_PATH
The uitility expects exactly two arguments. Providing more or fewer arguments than expected will result in an error.
Image formats are deduced from their file name extensions (".png", ".jpg", etc.). The formats of the two input images need not be the same. However, passing an image file with no extension, or one with a mislabeled extension, will result in an error.
Supported formats: All formats supported by the Rust crate "image".
If the images are evaluated to be the same, the program will output the string "Pictures are the same" to stdout. If the images are different, it will output "Pictures are different" to stdout. If an error occurs, a description of the error will be written to stderr.
Consider the following image of a cat, cat.jpg:

and suppose we have a resized version of cat.jpg, cat_edited.jpg
Then running
imgcmp cat.jpg cat_edited.jpg
will output
Pictures are the same.
Let's compare our cat.jpg:
with a ferrari.jpg:

Running
imgcmp cat.jpg ferrari.jpg
will output
Pictures are different.
If we change the exposition of our
ferrari.jpg)
to obtain,
ferrari_edited.png)
Then running
imgcmp ferrari.jpg ferrari_edited.png
will yield
Pictures are the same.