Skip to content
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

webp image fails to load with FormatError("Invalid VP8 signature.") #917

Closed
ivan opened this issue May 3, 2019 · 4 comments
Closed

webp image fails to load with FormatError("Invalid VP8 signature.") #917

ivan opened this issue May 3, 2019 · 4 comments

Comments

@ivan
Copy link

ivan commented May 3, 2019

Trying to load this image: https://ludios.org/tmp/IMG-2677.webp

shows

# ./target/debug/examples/opening ~/Downloads/IMG-2677.webp
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: FormatError("Invalid VP8 signature.")', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I think this image was generated by Google Photos on 2017-12-29. It renders fine in Chromium.

@HeroicKatora
Copy link
Member

HeroicKatora commented May 3, 2019

That's because the image does not contain vp8 data but vp8x data. webp is a container format, containing blocks which may be image data (more information by Google). The underlying image data encoding is vp8. The error could be clearer on this and be UnsupportedError instead, and also print the type of chunk that is not supported but this is not a bug.

@HeroicKatora
Copy link
Member

HeroicKatora commented May 3, 2019

We're currently missing a dedicated maintainer for webp/riff/vp8(needs completion)/(vp9 needs to be done at some point). So I wouldn't expect this is in the near future. Should someone be willing to take this on, the step to externalize the functionality into a separate crate should probably be done as well.

@Shnatsel
Copy link
Contributor

This is fixed on the next-version-0.25 branch. The image is decoded correctly and successfully.

@fintelia
Copy link
Contributor

I suspect this was actually fixed even earlier by #1624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants