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

cannot decode JXL with grayscale ICC profile #1289

Closed
5 tasks done
browningluke opened this issue Nov 8, 2023 · 7 comments
Closed
5 tasks done

cannot decode JXL with grayscale ICC profile #1289

browningluke opened this issue Nov 8, 2023 · 7 comments
Labels
dependencies Related to project dependencies released

Comments

@browningluke
Copy link

Steps to reproduce

  1. Launch docker image with 1.6.4
  2. Open book containing jxl files.
  3. Observe the correct pages shown.
  4. Launch docker image pointing to library with version 1.7.0 or 1.7.1
  5. Open same book containing jxl files.
  6. Observe a black screen with the Page x printed instead of the pages. Logs attached are visible in the docker container.

Expected behavior

Prior to v1.7.0, the jxl pages would convert perfectly to jpegs for all the books in my library. Opening a book with jxl images would work as intended.

Actual behavior

As of v1.7.0, the jxl pages fail to load with a black screen. These files are exactly the same, and I can downgrade to v1.6.4 to return the functionality.

Logs

Caused by: java.lang.IllegalArgumentException: colorSpace is not of type TYPE_RGB!
 at java.desktop/javax.imageio.ImageTypeSpecifier$Packed.<init>(Unknown Source) ~[na:na]
 at java.desktop/javax.imageio.ImageTypeSpecifier.createPacked(Unknown Source) ~[na:na]
 at com.twelvemonkeys.imageio.util.ImageTypeSpecifiers.createPacked(ImageTypeSpecifiers.java:116) ~[imageio-core-3.9.4.jar:3.9.4]
 at com.github.gotson.nightmonkeys.jxl.imageio.plugins.JxlImageReader.readInfo(JxlImageReader.java:45) ~[imageio-jxl-0.6.0.jar:0.6.0]
 at com.github.gotson.nightmonkeys.jxl.imageio.plugins.JxlImageReader.getNumImages(JxlImageReader.java:66) ~[imageio-jxl-0.6.0.jar:0.6.0]
 at com.twelvemonkeys.imageio.ImageReaderBase.checkBounds(ImageReaderBase.java:190) ~[imageio-core-3.9.4.jar:3.9.4]
 at com.github.gotson.nightmonkeys.jxl.imageio.plugins.JxlImageReader.readInfo(JxlImageReader.java:54) ~[imageio-jxl-0.6.0.jar:0.6.0]
 at com.github.gotson.nightmonkeys.jxl.imageio.plugins.JxlImageReader.read(JxlImageReader.java:101) ~[imageio-jxl-0.6.0.jar:0.6.0]
 ... 175 common frames omitted

logs-from-komga-in-komga-0(1).log

Komga version

1.7.1

Operating system

Debian

Installation method

Docker

Other details

No response

Acknowledgements

  • I have searched the existing issues (open AND closed) and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I have checked the FAQ.
  • I have updated the app to the latest version.
  • I will fill out all of the requested information in this form.
@darthmooguy
Copy link
Contributor

I've observed the same bug. However, for me it only happens with jxl that were converted from a jpeg with the greyscale color space. Komga can read the jpeg just fine, but the converted jxl file throws the invalid color space error. I have other jxl files that work in 1.7.1 though. It seems like a decoder bug (introduced with the nightmonkeys update maybe?), as I can open the jxl files that Komga can't read with other jxl compatible software.

@browningluke
Copy link
Author

browningluke commented Nov 8, 2023

as I can open the jxl files that Komga can't read with other jxl compatible software.

Same here, these images work fine in other software, and in v1.6.4.

I have other jxl files that work in 1.7.1 though.

After looking through my library, I've found a couple of pages that work too. They're usually just pages with color, and the rest of the grayscale pages fail to convert.

@gotson
Copy link
Owner

gotson commented Nov 8, 2023

Can you provide the file?

@browningluke
Copy link
Author

Can you provide the file?

@gotson Here is a truncated version (as to not distribute copyrighted material) of one file that partly works. The first 3 images render perfectly on both v1.6.4 and v1.7.1, but the last 2 pages only render on v1.6.4.

bugexample.zip

@gotson
Copy link
Owner

gotson commented Nov 8, 2023

fixed upstream in gotson/NightMonkeys@8b5651f

@gotson gotson added dependencies Related to project dependencies and removed triage labels Nov 8, 2023
@gotson gotson changed the title Issues with converting jxl to jpeg in >=1.7.0 cannot decode JXL with grayscale ICC profile Nov 8, 2023
@browningluke
Copy link
Author

Brilliant! Thanks for your awesome and hard work @gotson :)

Copy link
Contributor

github-actions bot commented Nov 9, 2023

🎉 This issue has been resolved in 1.7.2 (Release Notes)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Related to project dependencies released
Projects
None yet
Development

No branches or pull requests

3 participants