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
$upload->image_convert = 'jpg'; $upload->jpeg_quality = 85; $upload->image_crop=array($_POST["y1"], $upload->image_src_x - $_POST["x2"], $upload->image_src_y - $_POST["y2"], $_POST["x1"]); $upload->image_ratio=true; $upload->image_x=197; $upload->image_ratio_y=true; $upload->process('/mydir/');
I need to create a new image with 197x70 pixels. Sometimes, the area selected is bigger than this, so i need to do a proportional resize.
here is a part of my code