0.99.7: no JPEG XL output during batch conversion with greyscale filter

*** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

Wwctl
Posts: 4
Joined: Sat Feb 05, 2022 8:08 am

0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by Wwctl »

XnView: MP 0.99.7 x64
OS: Windows 11 x64

Effect: no file is saved during batch conversion when JPEG XL format is chosen

To reproduce:
1. Select a picture in XnView browser
2. Select Tools -> Batch Convert
3. Enable the "Change color depth" action on the "Actions" tab and set it to "Greyscale"
4. Select JPEG XL in the Output - Format section
5. Click the "Convert" button
Actual behaviour (bug): nothing is saved during the process, no error is reported in the log section

Expected behaviour: a converted file should be saved
XnConvert 1.95 x64 also doesn't work this way.
Last edited by Wwctl on Tue Feb 08, 2022 1:31 am, edited 1 time in total.
User avatar
masterjp
Posts: 466
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: 0.99.7: no JPEG XL output during batch conversion

Post by masterjp »

I use the JPEG XL export often and do not have any problems.

Which settings do you use?
Which format does the input files have (8 bit / 16 bit / 32bit)?
Do you have a sample file for testing?
PC: Intel 8700k + Asus Z370-F + 16 GB RAM G.Skill + Asus RTX 3050 OC + Samsung SSD
OS: Windows 10 Pro 64bit 22H2 |
GFX: XnViewMP 1.8.6 | XN-View 2.52.0 | XnConvert 1.104.0 | Adobe Photoshop Elements 2024 | Elements XXL 11 | Paint.Net 5.1.1
Wwctl
Posts: 4
Joined: Sat Feb 05, 2022 8:08 am

Re: 0.99.7: no JPEG XL output during batch conversion

Post by Wwctl »

masterjp wrote: Mon Feb 07, 2022 12:32 pm I use the JPEG XL export often and do not have any problems.
I've tested it one more time and simple conversion of any color image is in fact working. But if I use a gray 8-bit PNG image or if I enable the grayscale filter in the actions, then the application doesn't save anything. Here is my example image, but you can use any gray 8-bit PNG i think.
Last edited by Wwctl on Wed Feb 09, 2022 3:38 am, edited 1 time in total.
User avatar
masterjp
Posts: 466
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by masterjp »

The problem is the JPEG XL encoder itselfs, which is used by XnViewMP!
The JPEG XL encoder and decoder is currently in development
and it will take some time (years) to get the final version.
So not all features are available at the moment.

Your source picture has a color depth of 8bits (= max. 256 colours).
The JPEG XL encoder does not support this format!
That is the reason why XnViewMP does not save your file in batch conversion.

To save it in JPEG XL format, you need a 24 bit colour depth.

Here is a workaround to solve it:
-----------------------------------------
Add an action 'Change color depth' to the batch conversion and choose '24 bits'
Then it works fine!
XnViewMP.png
PC: Intel 8700k + Asus Z370-F + 16 GB RAM G.Skill + Asus RTX 3050 OC + Samsung SSD
OS: Windows 10 Pro 64bit 22H2 |
GFX: XnViewMP 1.8.6 | XN-View 2.52.0 | XnConvert 1.104.0 | Adobe Photoshop Elements 2024 | Elements XXL 11 | Paint.Net 5.1.1
Wwctl
Posts: 4
Joined: Sat Feb 05, 2022 8:08 am

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by Wwctl »

masterjp wrote: Tue Feb 08, 2022 6:00 pm The problem is the JPEG XL encoder itselfs, which is used by XnViewMP!
I don't think so, because the reference JXL encoder is able to deal with this image:
scr.png
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 45500
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
User avatar
xnview
Author of XnView
Posts: 45500
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.00 beta. Please check and confirm the bug fix here.
Pierre.
AKmatiAK
Posts: 4
Joined: Tue Apr 12, 2022 10:48 pm

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by AKmatiAK »

[2301] - Image is converted, but output is in 24-bit instead of 8-bit greyscale
AKmatiAK
Posts: 4
Joined: Tue Apr 12, 2022 10:48 pm

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by AKmatiAK »

Maybe JXL_TYPE_UINT8 has to be specified somewhere? https://libjxl.readthedocs.io/en/latest/api_common.html

btw I'm not a programmist so I'm not sure
AKmatiAK
Posts: 4
Joined: Tue Apr 12, 2022 10:48 pm

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by AKmatiAK »

It seems that image is saved in 8-bit sRGB instead of grayscale. That's what IM identify command says.
AKmatiAK
Posts: 4
Joined: Tue Apr 12, 2022 10:48 pm

Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter

Post by AKmatiAK »

https://github.com/libjxl/libjxl/issues/1342 - It's 8-bit grayscale but incorrectly reported bit depth