http://www.imagemagick.org/script/convert.php
You can also use some php functions that make good use of gd. I think there are a couple of objects and sniplets in google code making use of gd for the same stuff.
Personally I prefer ImageMagick because it's faster than php.