From d0e76e8a1b9fbc0fb3e51f08b7911a8eda30ae99 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 5 Jun 2023 15:38:59 +0200 Subject: [PATCH] wip #5991 --- src/Jobs/ProcessFile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Jobs/ProcessFile.php b/src/Jobs/ProcessFile.php index ae3d0a4..a122f99 100644 --- a/src/Jobs/ProcessFile.php +++ b/src/Jobs/ProcessFile.php @@ -168,11 +168,12 @@ class ProcessFile { $reffile = $this->makeSVGFile(); $minsize = 100; } else if (in_array($this->getFormat(), ['png', 'jpg'])) { + $q = ($this->getFormat() === 'jpg' && $this->getQuality() !== 85) ? '-' . $this->getQuality() : ''; $prefix = $this->isWithTexts() ? 't' : 'h'; if ($this->getResolution() === 'thumb') { $res = $dir . 'p' . $this->getPage() . '.' . $this->getFormat(); } else { - $res = $dir . $prefix . $this->getPage() . '-' . $this->getResolution() . '.' . $this->getFormat(); + $res = $dir . $prefix . $this->getPage() . '-' . $this->getResolution() . $q . '.' . $this->getFormat(); } } else if ($this->getFormat() === 'swf') { $res = $dir . 'p' . $this->getPage() . '.' . $this->getFormat(); -- 2.39.5