From e9e2927dd9fc7213bfc4d28f9889c341291c3b91 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 23 Nov 2013 23:19:57 +0100 Subject: [PATCH] Fixed ImageMagick issue --- .../system/image/adapter/ImagickImageAdapter.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php b/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php index 699680a38a..97e55de8be 100644 --- a/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php +++ b/wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php @@ -82,9 +82,14 @@ class ImagickImageAdapter implements IImageAdapter { * @see \wcf\system\image\adapter\IImageAdapter::createThumbnail() */ public function createThumbnail($maxWidth, $maxHeight, $obtainDimensions = true) { - /* todo: obtainDimensions=false doesn't work */ $thumbnail = clone $this->imagick; - $thumbnail->cropThumbnailImage($maxWidth, $maxHeight); + + if ($obtainDimensions) { + $thumbnail->thumbnailImage($maxWidth, $maxHeight, true); + } + else { + $thumbnail->cropThumbnailImage($maxWidth, $maxHeight); + } return $thumbnail; } -- 2.20.1