I needed a command line tool to compare image files so that I can improve the system tests of the tool that I’m working on.
I had trouble with getting image magic installed. In the end it seemed easier to to write my own command line tool for comparing image files and I thought others might find the tool useful. This tool will only work on 10.9, and if you want to build it or play with Xcode project you will need Xcode 5.0.1 as a minimum.
I’ve made the project with sources available on a public github git repository. The repository includes a built version of the command line tool in a folder called bin and you can download the command line tool directly or you can download the full repository and with Xcode build the command line tool. The command line tool uses two core image filters to do the work of comparing the images which will offload the work to your graphic card making the comparison relatively quick.
The github page is: https://github.com/SheffieldKevin/compareimages
To download compareimages command line tool directly you can follow this link: https://github.com/SheffieldKevin/compareimages/blob/master/bin/compareimages?raw=true
The downloaded file will not have execute permissions. To give it execute permissions do the following:
The github page lists the files and folders in the top level of the repository but if you scroll down you will be able to read the Readme file.