-
Notifications
You must be signed in to change notification settings - Fork 45
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
Compare image-webp and webp-sys #252
Comments
Closing this in favor of webp-animation, which is used now. |
The support for animated WebP in Could you re-run the tests with |
You are reading my mind, as this was exactly what I did last night after I updated |
Thank you! Could you share the exact code used for the comparison? Looking at the code, the decoder in |
I think I was wrong in assuming that into_frames() was the slow part. From looking at it more, the into_frames is very fast, but decoding the individual frames is slower. With The code is very simple: let frames = image::AnimationDecoder::into_frames(decoder);
for frame in frames {
if let Ok(f) = frame {
let (n, d) = f.delay().numer_denom_ms();
let delay = n / d;
let frame =
Frame::new(f.buffer().clone(), delay as u16, FrameSource::Animation);
_ = sender.send(frame);
}
} |
Thank you, I'll investigate. Also, why would you use If you are concerned about debug mode build times, just add this to your # Most of the time is spent in `image` and its dependencies,
# so build it with optimizations in debug mode to get good performance
# while simultaneously having `cargo build` complete quickly for short iteration times
[profile.dev.package.image]
opt-level = 3 |
I can reproduce the 4x difference in speed compared to |
Do an investigation about % images supported for a given test corpus.
The text was updated successfully, but these errors were encountered: