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
$U = new upload($file); $U->allowed = array("image/*"); $U->file_new_name_body =substr(md5(uniqid(rand(), true)),0,16); if($resize) { $U->image_resize = true; $U->image_ratio_crop = true; $U->image_x = $width; $U->image_y = $height; $U->image_ratio_no_zoom_in = true; } $U->file_overwrite = false; $U->file_auto_rename = true; $U->process($uploaddir); if ($U->processed) { $width = $U->image_dst_x; $height = $U->image_dst_y; $name = $U->file_dst_name; $U->file_new_name_body = $U->file_dst_name_body.'_100x100'; $U->image_resize = true; $U->image_ratio_crop = true; $U->image_x = 100; $U->image_y = 100; $U->image_ratio_no_zoom_in = true; $U->process($uploaddir); if($U->processed) { // more stuff
After upgrading from 0.25 to 0.28 I can't get image_dst_x and image_dst_y variables. It returns 0 for both.
My code: