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
$handle = new Upload("$path/temp/" . $savedname); $handle->image_resize = true; $handle->image_ratio_= true; $handle->image_= $image_size_small; $handle->image_convert = 'jpg'; $handle->jpeg_quality = 80; $handle->Process("$path/small/"); $filename=$handle->file_dst_name;
I have the following code
This works file if the file is not being renamed, but if the file gets renamed the file_dst_name take the orignal upload name i.e.
upload bluesqaure.png gets converted and renamed to bluesquare.jpg
upload bluesquare.png a second time and it dosent get converted to jpg and the name is blusquare_1.png
Any ideas?