-
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
Fix WebP decoding #1823
Fix WebP decoding #1823
Conversation
This looks plausible, but I'm not really familiar with the WebP format. Any chance you could add a test or two? |
Sure. I have an animated WebP that failed before this patch. I'll add a test that ensures that decoding it doesn't panic. |
Well, the test I added revealed another issue with the WebP decoder. I guess I'll fix that as well in this PR. |
Specifically, this code: https://github.com/image-rs/image/blob/master/src/codecs/webp/extended.rs#L83-L89 is wrong. It should check the color type of the first frame from the actual image data. |
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.
One style nit and a question with regards to the format, the code itself looks good to me.
Fixed |
Fixes #1775
I license past and future contributions under the dual MIT/Apache-2.0 license,
allowing licensees to choose either at their option.