-
-
Notifications
You must be signed in to change notification settings - Fork 308
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: cannot decode grayscale images #841
Comments
Interesting... I wasn't even aware that the format supported grayscale images. 😬 This StackOverflow Q/A seems to conclude it does not, and reading the specification myself I can't find a single mention of the words "grey" or "gray"... 🤷🏻 |
Actually, this is a plain RGB WebP, but with a grayscale ICC profile... The fix is quite simple, we'll just ignore the ICC profile. |
that's what i found too, and i did the same fix in NightMonkeys :) |
I'm interested how you found out that. I checked with |
A combination of educated guess and debugging. Got lucky. 😀 |
Describe the bug
This was reported in my own project Komga, where a user has webp images that are encoded in grayscale. The image reader throws an exception on read.
Version information
The version of the TwelveMonkeys ImageIO library in use: 3.9.4
The exact output of
java --version
(orjava -version
for older Java releases).MacOS Sonoma 14.0
Apple M1 Pro
To Reproduce
Steps to reproduce the behavior:
testRead
test methodExpected behavior
The image should be decoded.
Sample file(s)
Attach any sample files needed to reproduce the problem. Use a ZIP-file if the format is not directly supported by GitHub.
07_Ghost_01_[TnS]_002.zip
Stack trace
The text was updated successfully, but these errors were encountered: