Created
December 6, 2016 11:58
-
-
Save indatawetrust/f0ad980c47e10a42773d5b10bbbe3dd5 to your computer and use it in GitHub Desktop.
scales large images
This file contains hidden or 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
alias wh="identify -format '%w %h' $1" | |
scale(){ | |
for f in *.jpg; do | |
isWH="$(wh $f)" | |
getWH=(`echo $isWH | tr ' ' ' '`) | |
if [ ${getWH[1]} -ge 1000 ]; then | |
mogrify -geometry x1000 $f | |
fi | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment