Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.87k stars 1.5k forks source link

Why $this->removeAnimation($object); ? #401

Closed ghost closed 9 months ago

ghost commented 9 years ago

Hi,

in image\src\Intervention\Image\Imagick\Decoder.php there is the method initFromImagick() that contains the following lines: // currently animations are not supported // so all images are turned into static $object = $this->removeAnimation($object);

My Problem is: I am returning Images like that: Image::make('path/to/my/file.jpg')->response() directly from a Laravel route. Thats working fine with non-animated images. First I tried to do that with Gd until I found out that the library does not support animated gifs. Then I installed imagick and again: No output of animated gifs - just the first frame was returned. After digging through the intervention code I found the lines above. When I comment the removeAnimation function out I get my animations. So now my question: What is this method for? Is there any way to get animated gifs? Why is it not mentioned somewhere in the docs that there is no support for animated gifs? I mean I researched the whole evening...

Thanks in advance and best regards

olivervogel commented 9 years ago

I wanted to behave Intervention Image almost the same way with GD and Imagick driver, so I removed animations. If you delete removeAnimation and use Intervention Image with Imagick all methods like colorize or text would only affect the first frame of the animation, while leaving the others untouched. Since this is not ideal, I decided to remove the animation completely for now.

The next major version of Intervention Image will support animated GIF format for both GD and Imagick. Unfortunately there is no release date, because I'm pretty busy with paid work at the moment.

You can use plain PHP Imagick if you want animations right now.