Additionally, you may want to check on the scripts and modules available for
Gimp! It can do some amazing things and does them very well. Comes in both Win and *nix flavors, has a wide array of nearly fanatic folowers that crank out really nifty add-ons for it continually. It even has 3 interfaces: API, command line, and GUI. Heck, the TOOLS it uses are mostly written in Perl.
It requires gtk/gdk as well however. Check out
Marc's page and
CPAN for several good links to more info on using it in perl or perl with "it". It might be heavier than you need, but if not - why reinvent the wheel?
NOTE: It is also just a really fun thing to screw arround with during creative breaks from coding - be wary tho, I lost 40 minutes just verifying the links for this post as i got hooked on playing with it again *chuckle*
*G*