From dbd254a6218c60ee17043a6235ca8f11f3a4bd7a Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 10 Jan 2025 20:34:24 +0300 Subject: [PATCH] fix gif processing --- Web/Models/Entities/Photo.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Web/Models/Entities/Photo.php b/Web/Models/Entities/Photo.php index 90c532b2..9bcb2f70 100644 --- a/Web/Models/Entities/Photo.php +++ b/Web/Models/Entities/Photo.php @@ -107,6 +107,10 @@ class Photo extends Media $sizes = Image::calculateSize( $image->getImageWidth(), $image->getImageHeight(), 8192, 4320, Image::SHRINK_ONLY | Image::FIT ); + # gif fix 10.01.2025 + if($image->getImageFormat() === 'GIF') + $image->setIteratorIndex(0); + $image->resizeImage($sizes[0], $sizes[1], \Imagick::FILTER_HERMITE, 1); $image->writeImage($this->pathFromHash($hash)); $this->saveImageResizedCopies($image, $filename, $hash);