mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
降低缩略图质量
This commit is contained in:
parent
d5230acdb3
commit
bb37a11bfb
@ -567,7 +567,7 @@ class ImageService
|
|||||||
$height = (int)($h * $scale);
|
$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();
|
$img->destroy();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
Utils::e($e, '生成缩略图时出现异常');
|
Utils::e($e, '生成缩略图时出现异常');
|
||||||
|
Loading…
Reference in New Issue
Block a user