0

我将裁剪一部分图像并模糊原始图像问题是:我想将裁剪后的图像替换为原始模糊图像,该怎么做?我使用 JQUERY 框架中的jcrop裁剪图像,此代码用于裁剪

    if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
    $targ_w = $targ_h = 150;
    $jpeg_quality = 90;
    $src = $row['address'];
    $img_r = imagecreatefromjpeg($src);
    $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );   imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],$targ_w,$targ_h,$_POST['w'],$_POST['h']);
    header('Content-type: image/jpeg');
    imagejpeg($dst_r,null,$jpeg_quality);
4

0 回答 0