]> _ Git - fluidbook_tools.git/commitdiff
wip #4969 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 Dec 2021 11:21:25 +0000 (12:21 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 Dec 2021 11:21:25 +0000 (12:21 +0100)
src/Compiler/Compiler.php

index 94d9a0924d317d441c4303ad9cd62c531dd3c948..980885251818e9cd6f207eeaec837889afd60624 100644 (file)
@@ -188,7 +188,9 @@ class Compiler implements ShouldQueue, ShouldBeUnique {
     public function compileContents() {
         for ($i = 1; $i <= $this->getPageCount(); $i++) {
 
-            $this->vdir->copy($this->getProcessFile('back150', $i)->getPath(), 'data/background/150/p' . $i . '.jpg');
+            foreach ($this->resolutions as $resolution) {
+                $this->vdir->copy($this->getProcessFile('back' . $resolution, $i)->getPath(), 'data/background/' . $resolution . '/p' . $i . '.jpg');
+            }
             $this->vdir->copy($this->getProcessFile('text', $i)->getPath(), 'data/contents/p' . $i . '.svg');
             $this->vdir->copy($this->getProcessFile('thumb', $i)->getPath(), 'data/thumbnails/p' . $i . '.jpg');
         }
@@ -223,7 +225,7 @@ class Compiler implements ShouldQueue, ShouldBeUnique {
     public function compileConfig() {
         $settings = mb_substr(file_get_contents($this->stub . '/data/datas.js'), 13, -2);
         $this->config = json_decode($settings, false, 512, JSON_THROW_ON_ERROR);
-        $this->config->maxResolution = 150;
+        $this->config->maxResolution = 300;
 
         $this->compileDimensions();
         $this->compilePageNumbers();