I wanted to reduce the resolution of 160 image files (*.jpg) and add copyright lable. To do one by one is a time consuming and boring task. So I google a bit and found this nice tool which was installed with Fedora 10 by default. So no additional software installations and work done.
Here is the script I wrote to get the work done.
#! /bin/sh
DIR=~/123
for n in $(ls $DIR)
{
convert $DIR/$n -resample 28.25 -gravity SouthEast -fill white -draw 'text 10,10 "COPYRIGHT TEXT"' $DIR/$n
echo $n
}
exit 0
I copied all the images to "123" directory in my home directory. "-resample" is for the resolution and the rest for the copyright lable.
It took only about three minutes to get the work done (The original size of the images were 372MB which reduced to 75MB after reducing the resolution). Image how much time it will take if I used an image editing software like GIMP or photoshop.
Here is the link if you want to find out more,
http://www.imagemagick.org/www/convert.html
Add a comment