mirror of
https://github.com/openvk/openvk
synced 2025-01-22 15:54:26 +03:00
fix gif processing
This commit is contained in:
parent
3a114fdba9
commit
dbd254a621
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ class Photo extends Media
|
||||||
$sizes = Image::calculateSize(
|
$sizes = Image::calculateSize(
|
||||||
$image->getImageWidth(), $image->getImageHeight(), 8192, 4320, Image::SHRINK_ONLY | Image::FIT
|
$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->resizeImage($sizes[0], $sizes[1], \Imagick::FILTER_HERMITE, 1);
|
||||||
$image->writeImage($this->pathFromHash($hash));
|
$image->writeImage($this->pathFromHash($hash));
|
||||||
$this->saveImageResizedCopies($image, $filename, $hash);
|
$this->saveImageResizedCopies($image, $filename, $hash);
|
||||||
|
|
Loading…
Reference in a new issue