Page 1 of 1

1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Sun Apr 19, 2026 6:39 am
by Isaacz4
XnView: 1.10.5, 64-bit - Libformat 7.232 (Linux)
OS: Linux Mint Cinnamon 22.3, 64-bit

When viewing my JPEG XL files, I am noticing that XNViewMP is unable to handle both 32-bit RGBA JPEG XL files or 24-bit RGB JPEG XL files in the same session runtime. Seems like XNViewMP latches onto the first JPEG XL file and enforces the expected channels/encoding for all other JPEG XL files within the same session.

Effect: Improper rendering of JPEG XL files. 24-bit appear black if 32-bit was loaded first, and 32-bit is distorted and rendered incorrectly if 24-bit was loaded first. (Closing the program clears the discrepancy.)

To reproduce:

1. Close XNViewMP
2. Open 24-bit RGB JPEG XL file.
3. Open 32-bit RGBA JPEG XL file.
4. 32-bit RGBA JPEG XL file appears distorted, like monochrome scanlines.

(alternatively)

1. Close XNViewMP
2. Open 32-bit RGBA JPEG XL file.
3. Open 24-bit RGB JPEG XL file.
4. 24-bit RGB JPEG XL file appears black.

Actual behaviour (bug): 32-bit (RGBA) and 24-bit (RGB) JPEG XL files cannot be viewed correctly in the same session :bug:

Expected behaviour: XNViewMP should correctly display both RGB and RGBA JPEG XL images, regardless of load order, in the same session.
______________________________________________________

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Sun Apr 19, 2026 12:49 pm
by xnview
it's known issue with libjpegxl

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Sun Apr 19, 2026 3:25 pm
by Isaacz4
Thanks for the clarification.

I checked my system and I’m currently using libjxl 0.11.1 (cjxl/djxl), and the same JPEG XL files render correctly in other applications without any RGB/RGBA issues.

I also noticed that both libjxl 0.7 and 0.11 are present on my system. Is it possible that XnView MP is using the older 0.7 version?

If so, this might explain the behavior, since the issue appears to be resolved in newer libjxl versions.

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Sun Apr 19, 2026 6:36 pm
by Kadet
XnView use independet lib from other source, not yours files copied from github.

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Sun Apr 19, 2026 7:04 pm
by jkm
The upcoming release of XnViewMP has an updated version of libjxl, so watch out for that...

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Mon Apr 20, 2026 4:21 pm
by Isaacz4
I'll keep an eye out for that release then! Fingers crossed that the next (hopefully newer) release of the libjxl library for XNViewMP doesn't have this issue! šŸ¤žšŸ¤ž

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Fri May 01, 2026 1:50 pm
by Isaacz4
jkm wrote: Sun Apr 19, 2026 7:04 pm The upcoming release of XnViewMP has an updated version of libjxl, so watch out for that...
I tested the latest version (1.11.2 with updated libjxl), and the RGB/RGBA issue still occurs exactly as before. Other applications using the same system libjxl (0.11.x) do not exhibit this behavior. This suggests the issue may be related to how XnViewMP initializes or reuses the decoder between images.

Image

I've already opened up a 24-bit JXL file, which is why the images look like this. If I opened the 32-bit one first, I'd be able to see the one with the alpha channel with no issues, but the one on the right would render as black, or XNViewMP would refuse to open it. (Depends on if the "ignore read errors" option is checked or not.)

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Fri May 01, 2026 2:47 pm
by xnview
:bugconfirmed: Thanks to your detailed description I can reproduce the problem.

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Sun May 31, 2026 7:13 am
by shitori
viewtopic.php?t=49716

This is precisely the same issue that I reported previously. I look forward to seeing it resolved.

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Posted: Sun May 31, 2026 10:51 am
by WinnieW
Offical release of libjxl 0.12.0 is a matter of days.