-
Notifications
You must be signed in to change notification settings - Fork 596
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
can animated encoding only be done with gifs? #1909
Comments
No, I think you're right that GIFs are the only animated format we currently support on the encoding side. The focus of this crate is on images rather than videos, but reach out if you'd be interested in working on a PR to add animated PNG/webp/etc. |
@fintelia yes i'm interested in working on such a pr, but i'll need some guidance :) |
Which format are you hoping to add? The first step would be to look at how the encoding for that format is currently implemented, and see what pieces are already in place for handling animation. |
@fintelia i think png would be a good start since i want it to run on wasm and can't find any pure rust encoders for webp or avif (yet), there's pure rust apng encoding support in https://github.com/poccariswet/apng, which can be used as inspiration |
In fact, given that the PNG crate already implements a set_animated method, I think a lot of the pieces may already be in place |
hi @fintelia just wanted to follow up on this, can u please provide some high level guidance on what needs to be done here? this is likely the lowest level thing i've ever done, but i think i can get it done with your help :) |
The first step would probably be writing a standalone app using the |
so a few of the formats (e.g. png, webp, gif) can be transformed into frames after decoding, but it looks like only the gif encoder has a convenient frames consumer method
.encode_frames
, but based on the avif encoder's use of.write_all
in the.write_image
method, does that mean i could somehow call.write_image
with data from each of the frames to encode an animated avif?The text was updated successfully, but these errors were encountered: