Convert JPEG to a Progressive JPEG in PHP

前端 未结 3 706
[愿得一人]
[愿得一人] 2021-01-06 04:47

I\'m trying to re-save an already created JPEG as a progressive jpg.

Basically, on the front end I have some JS that crops an image, and outputs a base64 im

3条回答
  •  鱼传尺愫
    2021-01-06 05:36

    Use imageinterlace.

    $src_img = imagecreatefromjpeg('source.jpg');
    
    imageinterlace($src_img, true);
    
    imagejpeg($src_img, 'destination.jpg');
    
    imagedestroy($src_img);
    

提交回复
热议问题