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
source is an uploaded file - upload OK - file name OK - source variables file_src_name : Winter.jpg file_src_name_body : Winter file_src_name_ext : jpg file_src_pathname : /tmp/phpMG9nlg file_src_mime : image/jpeg file_src_size : 105542 (max= 2097152) file_src_error : 0 process file to ./test/ - file size OK - file mime OK : image/jpeg - file name safe format - destination variables file_dst_path : ./test/ file_dst_name_body : Winter file_dst_name_ext : jpg - image operation, keep extension - checking for auto_rename auto_rename to Winter_1.jpg - destination file details file_dst_name : Winter_1.jpg file_dst_pathname : ./test/Winter_1.jpg - Winter_1.jpg doesn't exist already - image resizing or conversion wanted
file not uploaded to the wanted location
Error: GD doesn't seem to be present