Incorrect orientation of images rotated with ImageMagick
authorAlexander Ebert <ebert@woltlab.com>
Fri, 17 Apr 2020 16:09:27 +0000 (18:09 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 17 Apr 2020 16:09:27 +0000 (18:09 +0200)
wcfsetup/install/files/lib/util/ImageUtil.class.php

index b0e89beeec89304d34475e49861ded1f9bde256d..a4f6019b6c158947da56b9b0d57b27c3395fbb1f 100644 (file)
@@ -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());
                                        }