我正在尝试使用此代码。
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
$src=$_POST['src'];
$targ_w = $targ_h = 150;
$jpeg_quality = 90;
$output_filename=$src;
$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );
$img_r = imagecreatefromjpeg($src);
imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],
$targ_w,$targ_h,$_POST['w'],$_POST['h']);
imagejpeg($dst_r, $output_filename, $jpeg_quality);
}
?>
请有人帮助我。感谢