]> source.dussan.org Git - nextcloud-server.git/commitdiff
OC\Preview - set scale factor down to 2 and upscale cached preview - this got lost...
authorGeorg Ehrke <developer@georgehrke.com>
Sat, 13 Jul 2013 22:00:10 +0000 (00:00 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Sat, 13 Jul 2013 22:00:10 +0000 (00:00 +0200)
lib/preview.php

index 08c0b7e20d070103a54d33fe3a46860ffb6a0a13..03aaaceb9ca8963bba054d38747d894064b16bea 100755 (executable)
@@ -60,7 +60,7 @@ class Preview {
                //set config
                $this->configMaxX = \OC_Config::getValue('preview_max_x', null);
                $this->configMaxY = \OC_Config::getValue('preview_max_y', null);
-               $this->maxScaleFactor = \OC_Config::getValue('preview_max_scale_factor', 10);
+               $this->maxScaleFactor = \OC_Config::getValue('preview_max_scale_factor', 2);
 
                //save parameters
                $this->setFile($file);
@@ -377,6 +377,7 @@ class Preview {
                if($cached) {
                        $image = new \OC_Image($this->userview->file_get_contents($cached, 'r'));
                        $this->preview = $image->valid() ? $image : null;
+                       $this->resizeAndCrop();
                }
 
                if(is_null($this->preview)) {