//define require_once("../../common.inc.php"); getget(); $page_field = ""; include("config.php"); if ($check == 'crop'){ $targ_w = $w; $targ_h = $h; $jpeg_quality = 90; $src = $img; $img_r = imagecreatefromjpeg($src); $dst_r = ImageCreateTrueColor( $targ_w, $targ_h ); imagecopyresampled($dst_r,$img_r,0,0,$x,$y, $targ_w,$targ_h,$w,$h); imagejpeg($dst_r,$img); //header("Location: profile_edit.php"); echo ""; } ?>