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 Reply
$handle = new upload($_FILES['image']); if ($handle->uploaded) { $handle->file_new_name_body = $_POST['image']; $handle->image_resize = true; $handle->image_x = MIMAGETHUMBSIZE; $handle->image_y = 150; $handle->image_ratio_y = true; $handle->image_ratio_x = true; $handle->image_convert = 'png'; $handle->process(MIMAGETHUMBPATH); $handle->file_new_name_body = $_POST['image']; $handle->image_resize = true; $handle->image_x = MIMAGESIZE; $handle->image_ratio_y = true; $handle->image_convert = 'png'; $handle->process(MIMAGEPATH); if ($handle->processed) { $handle->clean(); } }
this worked..