Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So, what about resizing animated GIFs? #816

Open
wtorsi opened this issue Oct 19, 2016 · 6 comments
Open

So, what about resizing animated GIFs? #816

wtorsi opened this issue Oct 19, 2016 · 6 comments
Labels
Type: Support This item pertains to support for this project.

Comments

@wtorsi
Copy link

wtorsi commented Oct 19, 2016

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?

@alexwilson alexwilson added the Type: Support This item pertains to support for this project. label Oct 20, 2016
@lsmith77
Copy link
Contributor

lsmith77 commented Nov 4, 2016

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

@malas
Copy link

malas commented Apr 19, 2017

Anyone solved this issue?

An example would be great. If provided i promise i will make a PR to documentation with it.

@sujayjaju
Copy link

Digging this back up ... anyone has an example of working with animated GIFs?

@todomagichere
Copy link

Same as @sujayjaju, anyone has an example of working with animated GIFs?

@xavicorral
Copy link

Same as @sujayjaju and @todomagichere , has anyone been able to load an animated GIF or PNG?

@Jayohhtchen
Copy link

What's the latest with this? Anyone manage to get this to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support This item pertains to support for this project.
Projects
None yet
Development

No branches or pull requests

8 participants