LiipImagineBundle
LiipImagineBundle copied to clipboard
So, what about resizing animated GIFs?
Hi, I've used this Filter to resize images in custom FilterLoader Maybe the problem is in my mac?
public function apply(ImageInterface $image)
{
$isAnimated = count($image->layers()) > 1;
if($isAnimated === true){
$image->layers()->coalesce();
/** @var ImageInterface $frame */
foreach ($image->layers() as $frame){
$frame->resize($this->size, $this->filter);
}
$image->layers()->merge();
} else {
$image->resize($this->size, $this->filter);
}
return $image;
}
With this config
liip_imagine:
driver: imagick
filter_sets:
default:
jpeg_quality: 90
png_compression_level: 9
animated: true
But, in the result i got the image with bad quality and not animated :) . Maybe I did something wrong?
fundamentally we use the imagine lib for resizing. so first check there if animated gifs are supported .. it looks like there is some support for it : https://github.com/avalanche123/Imagine/search?utf8=✓&q=animated
Anyone solved this issue?
An example would be great. If provided i promise i will make a PR to documentation with it.
Digging this back up ... anyone has an example of working with animated GIFs?
Same as @sujayjaju, anyone has an example of working with animated GIFs?
Same as @sujayjaju and @todomagichere , has anyone been able to load an animated GIF or PNG?
What's the latest with this? Anyone manage to get this to work?