From 19b8b389fd0131212ecc02efc5a2161c0a22c2fd Mon Sep 17 00:00:00 2001 From: Marek Bachmann Date: Wed, 28 Dec 2022 21:43:34 +0100 Subject: [PATCH 1/3] Fixed width and height not updated when image rotation is done by EXIF based orient method --- src/Object/Image.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Object/Image.php b/src/Object/Image.php index 62bc8d897f..db17e0e253 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -378,13 +378,13 @@ class Image $orientation = $this->image->getImageOrientation(); switch ($orientation) { case Imagick::ORIENTATION_BOTTOMRIGHT: - $this->image->rotateimage("#000", 180); + $this->rotate( 180); break; case Imagick::ORIENTATION_RIGHTTOP: - $this->image->rotateimage("#000", 90); + $this->rotate( -90); break; case Imagick::ORIENTATION_LEFTBOTTOM: - $this->image->rotateimage("#000", -90); + $this->rotate(90); break; } From ed05d6376dd46897a9dd3a3de1bdf827304f3541 Mon Sep 17 00:00:00 2001 From: MarekBenjamin <117765478+MarekBenjamin@users.noreply.github.com> Date: Wed, 28 Dec 2022 23:19:48 +0100 Subject: [PATCH 2/3] Update src/Object/Image.php Co-authored-by: Hypolite Petovan --- src/Object/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Object/Image.php b/src/Object/Image.php index db17e0e253..d05ff24d77 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -381,7 +381,7 @@ class Image $this->rotate( 180); break; case Imagick::ORIENTATION_RIGHTTOP: - $this->rotate( -90); + $this->rotate(-90); break; case Imagick::ORIENTATION_LEFTBOTTOM: $this->rotate(90); From 2d1d06c6d233458e4529482145946d08d21ffded Mon Sep 17 00:00:00 2001 From: MarekBenjamin <117765478+MarekBenjamin@users.noreply.github.com> Date: Wed, 28 Dec 2022 23:19:53 +0100 Subject: [PATCH 3/3] Update src/Object/Image.php Co-authored-by: Hypolite Petovan --- src/Object/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Object/Image.php b/src/Object/Image.php index d05ff24d77..0371037b23 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -378,7 +378,7 @@ class Image $orientation = $this->image->getImageOrientation(); switch ($orientation) { case Imagick::ORIENTATION_BOTTOMRIGHT: - $this->rotate( 180); + $this->rotate(180); break; case Imagick::ORIENTATION_RIGHTTOP: $this->rotate(-90);