Skip to content

Instantly share code, notes, and snippets.

@indatawetrust
Created December 6, 2016 11:58
Show Gist options
  • Save indatawetrust/f0ad980c47e10a42773d5b10bbbe3dd5 to your computer and use it in GitHub Desktop.
Save indatawetrust/f0ad980c47e10a42773d5b10bbbe3dd5 to your computer and use it in GitHub Desktop.
scales large images
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