Skip to content

Instantly share code, notes, and snippets.

@jacobvanorder
Last active January 18, 2016 21:00
Show Gist options
  • Save jacobvanorder/1f6abcc162ebf3b7d933 to your computer and use it in GitHub Desktop.
Save jacobvanorder/1f6abcc162ebf3b7d933 to your computer and use it in GitHub Desktop.
A shell for comparison of images
#!/bin/bash
#Must have imagemagick installed…
NUMBER_OF_PIXELS=$(compare -metric ae $1 $2 null: 2>&1)
identify -format "%[fx:$NUMBER_OF_PIXELS*100/(w*h)]" $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment