resizing images for web upload

March 31, 2005 Posted by mitch | projects, website | 0 Comments

I wrote a simple bash script to resize images I pull off my digital camera because resizing all of the AutoExpo images was a royal pain... Anyway, it does *very* little error checking (basically only checks to make sure you gave it atleast one argument...) so use it at your own risk!

#!/bin/bash
# bash script to automatically scale images to 25% of their original size
# using ImageMagik.

if [ ! -n "$1" ]
then
echo "Usage: `basename $0` [image path]/ [new resized path]/"
exit
fi

for file in `ls $1`; do
convert -monitor $1$file -resize 25% +profile "*" $2$file
done;


Comments

Post a comment

Random Quote:

Comments like "linux will never 'win' until it's easy to use" are silly.. Linux already won, it just isn't playing with you.

- LodCrappo (705968)[slashdot.org]