* thumbnail size and type changed

This commit is contained in:
Danyi Dávid 2017-08-12 17:39:17 +02:00
parent 5b0d883558
commit 36fa6c3297

View File

@ -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);
}