Skip to content

Instantly share code, notes, and snippets.

@kencoba
Last active July 11, 2017 02:04
Show Gist options
  • Save kencoba/4e28189487c7e8453bd66e3fc8889e74 to your computer and use it in GitHub Desktop.
Save kencoba/4e28189487c7e8453bd66e3fc8889e74 to your computer and use it in GitHub Desktop.
compute diffs for each png files in the directory.
#!/usr/bin/env zsh
if [ $# -ne 2 ]; then
echo "$# args specified" 1>&2
echo "usage: sh ./diffs.sh marker_filename target_directory" 1>&2
exit 1
fi
for target in $2/*.png
do
result=`compare -metric AE $1 $target - 2>&1 >/dev/null`
echo $result $1 $target
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment