From: Alexander Ebert Date: Fri, 17 Apr 2020 16:09:27 +0000 (+0200) Subject: Incorrect orientation of images rotated with ImageMagick X-Git-Tag: 5.2.6~45 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a98655cae878469e81c7f8a6926aeb2cabfc1af4;p=GitHub%2FWoltLab%2FWCF.git Incorrect orientation of images rotated with ImageMagick --- diff --git a/wcfsetup/install/files/lib/util/ImageUtil.class.php b/wcfsetup/install/files/lib/util/ImageUtil.class.php index b0e89beeec..a4f6019b6c 100644 --- a/wcfsetup/install/files/lib/util/ImageUtil.class.php +++ b/wcfsetup/install/files/lib/util/ImageUtil.class.php @@ -159,6 +159,10 @@ final class ImageUtil { } if ($newImage !== null) { + if (IMAGE_ADAPTER_TYPE === 'imagick') { + $newImage->setImageOrientation(\Imagick::ORIENTATION_TOPLEFT); + } + $adapter->load($newImage, $adapter->getType()); }