-
Notifications
You must be signed in to change notification settings - Fork 594
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
Animated WebP's cannot actually be loaded #2263
Comments
I believe this to be a regression introduced in My code using After update to
Although ironically, after the update, the |
EDIT: That's impossible, probably some caching issue when I was bisecting the culprit commit. Going to try again |
This issue is actually quite straightforward. The iterator now returns an error if there are no more frames instead of decoder
.into_frames()
.take_while(|frame| frame.is_ok())
.collect() Collecting the frames manually this way works. I will send an MR with a suggested fix as I believe |
This PR adds support for animated images. The image requires a id for it to actually animate across frames. Currently it only has support for `GIF`, I tried adding decoding a animated `WebP` into frames but it seems to error. This issue in the image crate seems to document this image-rs/image#2263. Not sure if this is the best way or the desired way for animated images to work in GPUI but I would really like support for animated images. Open to feedback. Example Video: https://github.com/zed-industries/zed/assets/76515905/011f790f-d070-499b-96c9-bbff141fb002 Closes #9993 Release Notes: - N/A --------- Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Nathan <nathan@zed.dev>
This PR adds support for animated images. The image requires a id for it to actually animate across frames. Currently it only has support for `GIF`, I tried adding decoding a animated `WebP` into frames but it seems to error. This issue in the image crate seems to document this image-rs/image#2263. Not sure if this is the best way or the desired way for animated images to work in GPUI but I would really like support for animated images. Open to feedback. Example Video: https://github.com/zed-industries/zed/assets/76515905/011f790f-d070-499b-96c9-bbff141fb002 Closes zed-industries#9993 Release Notes: - N/A --------- Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Nathan <nathan@zed.dev>
WebPDecoder
fails to decode WebP animations.Expected
It should probably work?
Actual behaviour
piston.webp
from the zip archive below) that works fine in Firefox and Chromium results inUnexpectedEof
("failed to fill whole buffer")image-webp
test suite fail with "Format error decoding WebP: No more frames: No more frames"Reproduction steps
WebPDecoder::new(BufReader::new(File::open(path)?))?.into_frames().collect_frames()?
piston.zip
The text was updated successfully, but these errors were encountered: