script from http://www.akikoskinen.info/image-diffs-with-git/