1.10.5: JPEG XL RGB/RGBA mishandling

Bugs which are supposed to be fixed in the next test version (not available yet)

Moderators: xnview, Dreamer

Isaacz4
Posts: 4
Joined: Fri Apr 17, 2026 10:39 pm

1.10.5: JPEG XL RGB/RGBA mishandling

Post 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.
______________________________________________________
User avatar
xnview
Author of XnView
Posts: 47743
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Post by xnview »

it's known issue with libjpegxl
Pierre.
Isaacz4
Posts: 4
Joined: Fri Apr 17, 2026 10:39 pm

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Post 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.
Kadet
Posts: 234
Joined: Thu Oct 20, 2022 7:23 pm

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Post by Kadet »

XnView use independet lib from other source, not yours files copied from github.
jkm
Posts: 518
Joined: Sat May 11, 2024 12:43 am

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Post by jkm »

The upcoming release of XnViewMP has an updated version of libjxl, so watch out for that...
Isaacz4
Posts: 4
Joined: Fri Apr 17, 2026 10:39 pm

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Post 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! 🤞🤞
Isaacz4
Posts: 4
Joined: Fri Apr 17, 2026 10:39 pm

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Post 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.)
User avatar
xnview
Author of XnView
Posts: 47743
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 1.10.5: JPEG XL RGB/RGBA mishandling

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.