From: Marcel Werk Date: Sat, 23 Nov 2013 22:19:57 +0000 (+0100) Subject: Fixed ImageMagick issue X-Git-Tag: 2.0.0_RC_3~21 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9e2927dd9fc7213bfc4d28f9889c341291c3b91;p=GitHub%2FWoltLab%2FWCF.git Fixed ImageMagick issue --- 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; }