-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: x/image/webp: add animation support to the decoder #53364
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
Comments
Animated WebP has depressingly poor support, even on Android, despite being vastly superior to GIF in many, many different ways. It would be fantastic if Go could add it. |
CC @nigeltao I doubt that anybody is opposed to doing this, but somebody has to do the work. I'm not sure that this needs to be a proposal at this stage. Accepting a proposal won't cause the work to be done. |
Yeah, I agree with what @ianlancetaylor said. I certainly don't have the spare time myself to work on this. |
A sample image can be found here: https://mathiasbynens.be/demo/animated-webp |
I have a working implementation of this, I just need to clean it up and submit a PR. |
https://go-review.googlesource.com/c/image/+/513295 Still needs some cleanup and documentation, but that's the gist of it. webp/vp8 is kind of funky. I'm torn between two things and would love feedback:
This has a major pain-point/drawback which is that the image frames are offset and aren't necessarily what you want from trying to decode the data or
This would make the library more useful, but also is more expensive to do. |
I did search for this, as I expected someone to have raised this issue before.
I tried to decode a
webp
image with animation and got:The behaviour of
gif.Decode
in this situation is to decode the first frame. And then there isgif.DecodeAll
which gives you a struct with all frames and the timing etc. information. It would be nice to have awebp.DecodeAll
or similar.The text was updated successfully, but these errors were encountered: