Browse Source

add config support for image scale

master
filesite 4 weeks ago
parent
commit
b7e38f9c18
  1. 3
      themes/beauty/controller/SiteController.php

3
themes/beauty/controller/SiteController.php

@ -528,7 +528,8 @@ Class SiteController extends Controller { @@ -528,7 +528,8 @@ Class SiteController extends Controller {
$imagick->scaleImage($width, $height, true); //生成缩略图,并自适应
$imagick->setImageFormat('jpeg');
$imagick->setImageCompressionQuality(90);
$quality = !empty(FSC::$app['config']['smallImageQuality']) ? FSC::$app['config']['smallImageQuality'] : 90;
$imagick->setImageCompressionQuality($quality);
$img_data = $imagick->getImageBlob();
$imagick->clear();

Loading…
Cancel
Save