in reply to Batch image editing

Image::Magick would be of use.

Also, check out: http://www.imagemagick.org/script/perl-magick.php for more info.