From 6b5e4fbe13d94fc625c9e62b6428610e6bbb3e40 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Thu, 14 Mar 2024 23:00:12 +0100 Subject: [PATCH 1/2] BUGFIX: Strip image to prevent wrong orientation information in exif data --- Neos.Media/Classes/Domain/Service/ImageService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Neos.Media/Classes/Domain/Service/ImageService.php b/Neos.Media/Classes/Domain/Service/ImageService.php index ecbe0a245ba..96319d8f42a 100644 --- a/Neos.Media/Classes/Domain/Service/ImageService.php +++ b/Neos.Media/Classes/Domain/Service/ImageService.php @@ -141,6 +141,9 @@ public function processImage(PersistentResource $originalResource, array $adjust $imagineImage->usePalette(new RGB()); } + $stripFilter = new \Imagine\Filter\Basic\Strip(); + $stripFilter->apply($imagineImage); + if ($this->imagineService instanceof Imagine && $originalResource->getFileExtension() === 'gif' && $this->isAnimatedGif(file_get_contents($resourceUri)) === true) { $imagineImage->layers()->coalesce(); $layers = $imagineImage->layers(); From 48d1663b1da46fa137ef30adeb78273bb152dbf8 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Sun, 7 Apr 2024 18:36:25 +0200 Subject: [PATCH 2/2] BUGFIX: Strip image to prevent wrong orientation information in exif data --- Neos.Media/Classes/Domain/Service/ImageService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Neos.Media/Classes/Domain/Service/ImageService.php b/Neos.Media/Classes/Domain/Service/ImageService.php index 96319d8f42a..fc4a8e46c5d 100644 --- a/Neos.Media/Classes/Domain/Service/ImageService.php +++ b/Neos.Media/Classes/Domain/Service/ImageService.php @@ -141,8 +141,7 @@ public function processImage(PersistentResource $originalResource, array $adjust $imagineImage->usePalette(new RGB()); } - $stripFilter = new \Imagine\Filter\Basic\Strip(); - $stripFilter->apply($imagineImage); + $imagineImage->strip(); if ($this->imagineService instanceof Imagine && $originalResource->getFileExtension() === 'gif' && $this->isAnimatedGif(file_get_contents($resourceUri)) === true) { $imagineImage->layers()->coalesce();