2
most servers that have php enabled will also have installed the GD or GD2 image library's.. which u can use with xcgal.. GD2 is better than GD if it's available..
or you could use NetPBM which is what i used, altho u will have to find some pre compiled binaries if you don't have root access to your server.. let me know if you want to use netpbm and i'll zip the binaries up that i used with xcgal (providing ur server is linux/unix based) cos i only have binaries for that O/S..
or there is Imagemagik which by all means is pretty good, but requires root access to install, and i could never find any already compiled binaries for it.
the chances are you will have GD installed, even better if you have GD2 as it's just as functional as netpbm.. you can find out what version you have by using a phpinfo script.. and looking for the GD class and check the version number..
if you only have GD 1 installed, then you may find it better to use NetPBM, but if you have GD2 then there wouldn't be much difference between using either of them..