Page 1 of 1
0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Sat Feb 05, 2022 8:24 am
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.
Re: 0.99.7: no JPEG XL output during batch conversion
Posted: Mon Feb 07, 2022 12:32 pm
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?
Re: 0.99.7: no JPEG XL output during batch conversion
Posted: Tue Feb 08, 2022 1:46 am
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.
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Tue Feb 08, 2022 6:00 pm
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
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Wed Feb 09, 2022 3:47 am
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:
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Mon Feb 14, 2022 8:53 am
by xnview

Thanks to your detailed description I can reproduce
the problem.
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Mon Mar 28, 2022 10:13 am
by xnview
This problem is supposed to be fixed in
XnView MP 1.00 beta. Please check and confirm the bug fix here.
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Tue Apr 12, 2022 10:57 pm
by AKmatiAK
[2301] - Image is converted, but output is in 24-bit instead of 8-bit greyscale
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Wed Apr 13, 2022 8:17 am
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
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Wed Apr 13, 2022 2:27 pm
by AKmatiAK
It seems that image is saved in 8-bit sRGB instead of grayscale. That's what IM identify command says.
Re: 0.99.7: no JPEG XL output during batch conversion with greyscale filter
Posted: Fri Apr 15, 2022 8:55 am
by AKmatiAK
https://github.com/libjxl/libjxl/issues/1342 - It's 8-bit grayscale but incorrectly reported bit depth