From aa082e3acaca6bef981ae178938945af5e5eb2ca Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 5 Jun 2023 12:42:49 +0200 Subject: [PATCH] wip #5991 @0.25 --- src/PDFTools.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PDFTools.php b/src/PDFTools.php index af58cb5..e43ee8b 100644 --- a/src/PDFTools.php +++ b/src/PDFTools.php @@ -137,8 +137,8 @@ class PDFTools { return trim($path, '/'); } - public static function makeMiniShot($in, $out, $page, $format = 'jpg') { - self::makeShotFixedWidth($in, $out, $page, 'p', 500, 65, 4, 'PNM', $format); + public static function makeMiniShot($in, $out, $page, $format = 'jpg', $quality = 85) { + self::makeShotFixedWidth($in, $out, $page, 'p', 500, max(0, min(100, $quality - 15)), 4, 'PNM', $format); } public static function makeShotFixedWidth($in, $out, $page, $prefix = '', $w = 100, $quality = 90, $antialiasing = 4, $method = 'PNM', $format = 'jpg') { -- 2.39.5