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.

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

Advertisements

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 )

Google+ photo

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

Connecting to %s