Created
August 14, 2013 14:59
-
-
Save jordanthomas/6231843 to your computer and use it in GitHub Desktop.
Create thumbnails from images in current directory.
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
#!/bin/bash | |
images=$(ls | grep -e '.[jpg|png]$') | |
for image in $images | |
do | |
base=$(basename "$image") | |
name="${base%.*}" | |
echo "Thumbnailing $image..." | |
convert "$image" -thumbnail 140x140^ -gravity center -extent 140x140 "${name}_thumb.jpg" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment