php - Best way to blur images

前端 未结 3 1806
鱼传尺愫
鱼传尺愫 2021-01-02 18:53

I\'m trying to blur first image like third one,But I cant do it ! :(

 header(\'Content-Type: image/jpeg\');
$image = imagecreatefromjpeg(\'1.jpg\');
for ($x=         


        
3条回答
  •  攒了一身酷
    2021-01-02 19:20

    i also faced this problem in my project that time i use some long code but i think that, that code is not proper and create my own small code, here is that code

    header("content-type: image/png");
    $image = imagecreatefromjpeg("abc.jpg");
    for ($x=1; $x<=50; $x++)
    {
     imagefilter($image, IMG_FILTER_GAUSSIAN_BLUR);
    }
    imagepng($image);
    imagedestroy($image);
    

提交回复
热议问题