From a98655cae878469e81c7f8a6926aeb2cabfc1af4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 17 Apr 2020 18:09:27 +0200 Subject: [PATCH] Incorrect orientation of images rotated with ImageMagick --- wcfsetup/install/files/lib/util/ImageUtil.class.php | 4 ++++ 1 file changed, 4 insertions(+) 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()); } -- 2.20.1