Created
April 8, 2017 18:55
-
-
Save brb/114c8c965ba402c96c5efaad6cce6373 to your computer and use it in GitHub Desktop.
vagabonds-img-resize.sh
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/sh | |
DIR="$1" | |
#echo "Renaming JPG -> jpg ..." | |
#for f in $DIR/*; do | |
# mv "$f" $(echo "$f" | tr '[:upper:]' '[:lower:]') | |
#done | |
for f in $DIR/*; do | |
#size=$(identify $f | awk '{print $3}') | |
#width=$(echo $size | cut -dx -f1) | |
#height=$(echo $size | cut -dx -f2) | |
#convert $f -resize 320 $ | |
fn=$(basename "$f") | |
pref="${fn%.*}" | |
convert $f -resize 320 "$DIR/${pref}-small.jpg" | |
#echo "$f $width $height $ratio" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment