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->file_new_name_body = "300x160"; $handle->image_resize = true; $handle->image_ratio_crop = true; $handle->image_x = 300; $handle->image_y = 160; $handle->image_ratio_no_zoom_in = true; $handle->Process($filedir); $handle->Clean();
This will result in an image exactly 300x160, except if the original image is smaller than that.
regards martina