-
-
Notifications
You must be signed in to change notification settings - Fork 315
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 decoded as green #734
Comments
Hi Harald, i tested this with NightMonkeys ImageIO, and it works fine, so it seems to be an issue with TwelveMonkeys. The webp image doesn't seem to have any specific features:
|
Thanks for reporting! I can reproduce the result with your attached sample file. I don't have an immediate fix, unfortunately, so I need to look into why this is happening... Any help appreciated! 😀 |
I thought I'd try my hand at this, but after 2 days I give up. It happens for JPG, BMP, PNG, TGA and TIFF. Other file types marked as writable don't generate a file. So I concluded it wasn't a writer issue. Having learned that, I focused on the WebPImageReader, but comparing to other webp images, nothing seems out of the ordinary. So in the end, I wasn't able to find anything. Except for the fact that the example images here: https://developers.google.com/speed/webp/gallery2#webp_links Only write PNG and TGA, but not JPG and BMP. I didn't check with the others. With the same code I used to test the image provided here. Which is just the example code from the readme that does
With only default params and a write to the format I want added at the end. Nothing serious, just thought I'd try this out. |
Thanks @KoenDG! True, it's not a writer issue, you can see the images decodes as green only by reading and displaying the image (in Java). (The fact that some formats don't write all images probably has to do with the pixel layout, more specifically, standard JPEG and BMP plugins doesn't write images with alpha, see the respective plugin Spi's |
Something in general I'd like to vent frustration at, is the lack of tools around the internet to properly analyze images for their technical details. Or maybe I'm just not "in the know" for this. Given how this happens for non of the google example images, I thought "there's probably something really specific going on, what tool could print out the technical details for this image, stuff at the bit level or in hexadecimal". But even looking at it with a hex editor was gibberish. I also couldn't find another webp image with 24 pixel depth like the one at issue here to compare. |
@KoenDG Not sure what kind of details you expect to find? Tools like ExifTool or other command line imaging tools like ImageMagick might help? There are also more sophisticated tools in the "forensics" category that might help here. Most of the time I'm just using a plain hex viewer/editor and do my own parsing. Especially when looking at corrupted or malformed files, this might be the only way... But as each file format is different, you often need to have an understanding of the specification for the format to make sense out of it. It's not gibberish. It's just image data... 😀 |
Describe the bug
A specific webp image turns green when converted to jpeg or png.
Version information
3.9.4. I also tried with 3.10.0-SNAPSHOT.
java --version
(orjava -version
for older Java releases).openjdk version "1.8.0_332"
OpenJDK Runtime Environment Corretto-8.332.08.1 (build 1.8.0_332-b08)
OpenJDK 64-Bit Server VM Corretto-8.332.08.1 (build 25.332-b08, mixed mode)
I tested on macOS 13.2.1.
User reported on Windows 11.
Expected behavior
The converted image should look like the original.
Sample file(s)
001e.zip
Screenshots
Additional context
This was reported in gotson/komga#1077
The text was updated successfully, but these errors were encountered: