From: Vincent Vanwaelscappel Date: Mon, 5 Jun 2023 13:38:59 +0000 (+0200) Subject: wip #5991 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d0e76e8a1b9fbc0fb3e51f08b7911a8eda30ae99;p=fluidbook_tools.git wip #5991 --- 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();