class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
wow, found this class yesterday was just about to try and code something to do the above and i see your almost about to release what i want as a part of the class...
Can't wait =)