A BASH Shell script to create thumbnails using ImageMagick

This shell script loops over all the files in the current directory and creates thumbnails in JPG format with a quality factor of 50% in the ‘new’ directory.

for f in $FILES
echo “Processing $f file…”
convert $f -thumbnail 90×90\> -unsharp 0x.5 -quality 50 ./new/s_${f%.*}.jpg

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.