Created
June 11, 2016 16:10
-
-
Save cworks/cd0bc311e5903f9cd1922989ff6ed71a to your computer and use it in GitHub Desktop.
Create a center cropped image thumbnail
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 | |
a=1 | |
for i in *.jpg; do | |
new=$(printf "thumb%04d.jpg" "$a") | |
convert "$i" -thumbnail 100x100^ -gravity center -extent 100x100 "$new" | |
echo "thumbnailed $i to $new" | |
let a=a+1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment