From 36fa6c3297d4b8862c841091b0d3237d5085345a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danyi=20D=C3=A1vid?= Date: Sat, 12 Aug 2017 17:39:17 +0200 Subject: [PATCH] * thumbnail size and type changed --- src/App/Service/GalleryService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App/Service/GalleryService.php b/src/App/Service/GalleryService.php index 72723e7..7cd66c4 100644 --- a/src/App/Service/GalleryService.php +++ b/src/App/Service/GalleryService.php @@ -15,7 +15,7 @@ class GalleryService const CONFIG_FILE = 'data/galleries/config.yaml'; const IMAGE_BASEDIR = 'data/galleries/%s/'; - const THUMBNAIL_SIZE = 250; + const THUMBNAIL_SIZE = 500; protected $contentTypeMap = [ 'jpg' => 'image/jpeg', @@ -166,10 +166,10 @@ class GalleryService $thumbImageName = $thumbPath . "/" . $imageName; if (!file_exists($thumbImageName)) { - $thumbSize = new Box($numericSize, $numericSize); + $thumbSize = new Box($numericSize, $numericSize*10); $imagine = new Imagine(); $image = $imagine->open($galleryDirectory . $imageName) - ->thumbnail($thumbSize, ImageInterface::THUMBNAIL_OUTBOUND); + ->thumbnail($thumbSize, ImageInterface::THUMBNAIL_INSET); $image->effects()->sharpen(); $image->save($thumbImageName); }