summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-07-20 15:34:02 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-07-20 15:34:02 -0100
commitfff29cd492c33394ddd1b500741ce86ed1117cf9 (patch)
treee9dd5663aefb5bddd14ac18bbb0eca8daccd5cd2 /lib
parentd6b424bb81691ac719490b00165c9216501b05c0 (diff)
smaller resize + lint errors
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/CacheDocumentService.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Service/CacheDocumentService.php b/lib/Service/CacheDocumentService.php
index b50b827e..78505637 100644
--- a/lib/Service/CacheDocumentService.php
+++ b/lib/Service/CacheDocumentService.php
@@ -61,6 +61,9 @@ class CacheDocumentService {
use TStringTools;
+ const RESIZED_HEIGHT = 250;
+ const RESIZED_WIDTH = 350;
+
/** @var IAppData */
private $appData;
@@ -186,7 +189,7 @@ class CacheDocumentService {
$image->quality_jpg = 100;
$image->quality_png = 9;
- $image->resizeToBestFit(500, 300);
+ $image->resizeToBestFit(self::RESIZED_WIDTH, self::RESIZED_HEIGHT);
$content = $image->getImageAsString();
} catch (ImageResizeException $e) {
}