Shell Script for Batch Convertion of Images

Tagged with: , , , , , ,

An easier way to batch convert images using the ‘convert’ command


#!/bin/sh
# An Easy command to use the convert command. Makes sure that the rename problem don't happen

if [ ! -d "Out" ]; then
        mkdir Out
fi

sel="*.*"
if [ $# -eq 2 ] ; then
        sel=$2
fi

for i in $sel; do
        echo -n "Converting $i ... "
        convert $1 $i Out/$i
        echo "Done"
done

3 Responses to “Shell Script for Batch Convertion of Images

Leave a Reply