-
Notifications
You must be signed in to change notification settings - Fork 618
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
Extended WebP image decoding #1685
Conversation
Doesn't compile, need to restructure some parts.
Only works with VP8L animated at the moment.
Also improves the structures in extended to match the possible values better.
Note gif doesn't support transparency fully so won't encode very well.
Bit awkward that canvas size is u24 but lossless image size is u14.
Removes old tests for previous vp8x behaviour. Adds new tests for alpha/animated
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So nice to see this PR 🥺
Also updated lib.rs and fixed some number conversion issues.
Also, with the tests I created an animated image to test but I couldn't figure out how the reference tests check against the frames of animated images if at all. At the moment, it just checks against the first frame of the animation but ideally it would check more. |
@HeroicKatora Sorry, but do you have any further feedback? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
All files had been marked 'viewed' for me, somehow must have missed pressing |
Allows for decoding of extended WebP headers(VP8X) as described here, including lossy alpha images and animated WebP files.
Integrates with the current AnimationDecoder trait for animation. One thing that I think would make sense on that trait is a way to get the loop count out of it. Also when testing, I was trying the frame offsets in the Frame::from_parts() which fit what I was doing quite well, but it never seemed to work properly when encoded to a GIF, so it just manually draws the background with the offset.
Ignores ICCP colour profiles, XMP and EXIF metadata. If #1448 happens, maybe we could integrate that in.
Feedback would be appreciated.