I would have to say that your best bet is ImageMagick, if you
can get them to install it, do. It is an excellent package for
this kind of thing. Anything else you may have to code from
a library like Imlib... which isn't much better than
ImageMagick on space or ease of compiling.
GD would probably work... but as was said... no gif support,
if you want gif support...