From bb37a11bfbd5e072d7e0bec234e9220d434396c0 Mon Sep 17 00:00:00 2001 From: Wisp X <1591788658@qq.com> Date: Fri, 21 Oct 2022 10:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=8D=E4=BD=8E=E7=BC=A9=E7=95=A5=E5=9B=BE?= =?UTF-8?q?=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/ImageService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/ImageService.php b/app/Services/ImageService.php index bb4f54a0..f10f5844 100644 --- a/app/Services/ImageService.php +++ b/app/Services/ImageService.php @@ -567,7 +567,7 @@ class ImageService $height = (int)($h * $scale); } - $img->fit($width, $height, fn($constraint) => $constraint->upsize())->encode('png')->save($pathname); + $img->fit($width, $height, fn($constraint) => $constraint->upsize())->encode('png', 60)->save($pathname); $img->destroy(); } catch (\Throwable $e) { Utils::e($e, '生成缩略图时出现异常');