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
$path = '../photos/small/'; $obj = new upload($_FILES['image']); if($obj->uploaded) { $time = time(); $obj->file_new_name_body = $newid."-".$time; $obj->jpeg_quality = 100; $foo->image_resize = true; $foo->image_ratio_crop = true; $foo->image_y = 75; $foo->image_x = 75; $obj->process($path); if ($obj->processed){ $imageOriginal = $obj->file_dst_name; $size = getimagesize($path . $imageOriginal); $imageOriginalWidth = $size[0]; $imageOriginalHeight = $size[1]; }
It returns the image at its original size. Any suggestions?