Detect JPEG image quality

后端 未结 7 882
借酒劲吻你
借酒劲吻你 2021-02-10 10:25

I allow users to upload images. However, I want to keep JPEG quality not more than 90%. What I plan to do is to detect the current quality: - If less than 90% do nothing - If mo

7条回答
  •  逝去的感伤
    2021-02-10 10:52

    Since the OP stated he prefers php, I offer the following:

    $img = new Imagick($filename);
    $quality = $img->getImageCompressionQuality();
    

提交回复
热议问题