I would also mention, as a long shot, in case you can't get the results you need from the 2 above mentioned modules; that Gimp-fu, the scripting interface to the great Image program the Gimp, is worth a look : Gimp-Perl-fu
I would try perlmagick first myself.... but it's syntax can take some getting used to.