Created
December 27, 2012 21:55
-
-
Save anonymous/4392400 to your computer and use it in GitHub Desktop.
Using ImageMagick to make thumbs of a folder of images... all this in a shell script for easy batching.
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 | |
# modify these two variables to be the width and height of your desired thumbnails | |
width=250 | |
height=250 | |
clear | |
echo Resizing your images and making thumbs | |
for img in `ls *.jpg` | |
do | |
name=${img%.*} | |
ext=${img#*.} | |
convert -sample ${width}x${height}^ -gravity center -crop ${width}x${height}+0+0 $img $name-thumb.$ext | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment