]> _ Git - fluidbook_tools.git/commitdiff
wip #5991
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 5 Jun 2023 13:38:59 +0000 (15:38 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 5 Jun 2023 13:38:59 +0000 (15:38 +0200)
src/Jobs/ProcessFile.php

index ae3d0a4826c2032da6d4123b3aa9f18c69bba8c2..a122f998bb170409602cfadea72c9a9dc615ff04 100644 (file)
@@ -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();