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.
more info about the class
See all posts See thread Reply
$handle->image_rotate = '90'; $handle->file_overwrite = true; $handle->process('images/small');
You have to quote the file path in the process method. Not intuitive, as the class already knows the full path from when it is instantiated.
If you call process() without an argument, it outputs the image directy to the browser. It is documented here