Once again proving that bored programmers are dangerous things. Here is a little class I did up to handle some common image manipulations. I tried to make it pretty bullet proof, well commented with minimal repeated code.
For the test page the username must be 100% alphabetic and the uploaded file must be under 40k. The images will only stay on the server for 10 minutes so if you like something it generates save it to your own harddrive.
Test Page: http://www.enderswebdev.com/test/img_class
Source File: http://www.enderswebdev.com/test/img_class/im_class.phps