Skip to content

Instantly share code, notes, and snippets.

@lajlev
Created November 26, 2014 15:12
Show Gist options
  • Save lajlev/030220ad1a182697d51e to your computer and use it in GitHub Desktop.
Save lajlev/030220ad1a182697d51e to your computer and use it in GitHub Desktop.
Bash function to fetch pixel width and height of images.
function pixels() {
echo -e "w x h | $(sips -g pixelWidth $1 | tail -n1 | cut -d" " -f4) x $(sips -g pixelHeight $1 | tail -n1 | cut -d" " -f4)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment