Created
May 20, 2017 10:00
-
-
Save chibi929/0c3182b50dcce85f5e4c67808b371bcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! type convert > /dev/null 2>&1; then | |
echo 'Require: ImageMagick' | |
exit 1 | |
fi | |
if [ $# -ne 1 ]; then | |
echo 'Usage: bash image-size.sh ${IMAGE_FILE}' | |
exit 1 | |
fi | |
file=$1 | |
identify -format "%w %h\n" ${file} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment