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
Thanks for the prompt reply.
I have 2 quetsions:
1) Could this aggect other functions such as the resize and convert?
2) Where should i set $this->mime_magic= false;
If i do that there will be no control to the file types that will be uploaded?