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

Why is options.animated=true not the default? #4006

Open
Alfagun74 opened this issue Feb 23, 2024 · 2 comments
Open

Why is options.animated=true not the default? #4006

Alfagun74 opened this issue Feb 23, 2024 · 2 comments
Labels

Comments

@Alfagun74
Copy link

Question about an existing feature

I had a rather frustrating user experience, because why would anyone input a gif and expect it not to read all animated frames? I find this rather unintuitive and would like to suggest options.animated=true as the default.

Related: #3625

@lovell
Copy link
Owner

lovell commented Mar 1, 2024

This is a tricky one as defaulting to reading all frames of an animated image could lead to unexpected behaviour on the output side.

As you've seen from the documentation, the underlying libvips processes multiples frames as a vertically-stacked "toilet roll" image. When using an output format that does not support animation, the image will contain the stack of frames. This implementation detail of libvips has caused more support overhead than anything relating to the default value for animated, so the evidence is that the current behaviour is optimal.

It's not unusual to see really, really large GIF images. Defaulting to only reading the first frame is partly a safety feature; you need to explicitly opt-in to what could potentially be a resource hog.

In my experience, most animated images should have been a video.

@Alfagun74
Copy link
Author

I respectfully disagree. GIFs are meant to be animated and are incredibly prevalent in today's Internet culture. They serve a unique purpose in communication by providing small & fast looping animations that play automatically without user interaction.

The default setting of reading only the first frame of a GIF overlooks its intended use. This setting simply provides a less intuitive user experience.

But do as you like :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants