You might also want to take a look at the Image_Transform PEAR package. It takes care of a lot of the low-level details for you and makes creating and maniuplating images painless. It also lets you use either GD or ImageMagick libraries. I've used it with great success on several projects.