3
Dee's metod will work under most circumstances. One method that has always workd for me is to use the GD libraries, which most servers have configured for version 1 or 2.
There are other server requirements that I can't quite think of right now, but I'm almost positive that GD will work under most conditions; at least thats been my luck so far on all servers I've worked on.