Page 1 of 1

0.99.1: JPEG-XL quality scale "0" confusion

Posted: Tue Oct 12, 2021 5:27 pm
by b2p
XnView: MP 0.99.1 - 64 bit
OS: Windows 10 - 64 bit

Hi,

When converting images to JPEG-XL format usng the "Batch convert" tool, you have the option of selecting a quality of 0-99. However, setting the quality to "0" produces randomly fluctuating file sizes, sometimes larger than quality "1", sometimes smaller than quality "1", and sometimes close to quality "99".

To reproduce:
1. Open "Batch convert" to prepare an image for conversion
2. Select "Format" as "JXL - JPEG XL"
3. Select "Quality" at various values between "1-99", as well as at "0"
4. Determine if file sizes fluctuate

Actual behaviour (bug): Randomly fluctuating file sizes :bug:

Expected behaviour: File size smaller than "1", or scale changed to "1-100" instead of "0-99"

Re: 0.99.1: JPEG-XL quality scale "0" confusion

Posted: Wed Oct 13, 2021 3:51 pm
by Jou
0 is defined as "lossless".
I am not the xnview maker, but comparing it to the command line conversion tool available from the jpeg-xl makers at https://github.com/libjxl/libjxl/action ... lease.yaml
0 tries a lossless conversion. If the source is a JPEG the original cjxl tool will transcode of the existing jpeg compression information, resulting in a smaller file with absolutely bit exact the same quality. I don't know whether XNView does the same. If the source is GIF/PNG the cjxl tool will try to encode with lossless quality. In my mass conversions using the cjxl tool I got along some .GIFs ended up being larger than the original, mostly old Dilbert from before 2000.

IMHO you have to supply the example picture(s), and try with the "original" tool beforehand. If that one fails to get a better compression too you should create an issue report there.

use: cjxl.exe INPUT.pic OUTPUT.JXL -d 0

Re: 0.99.1: JPEG-XL quality scale "0" confusion

Posted: Wed Oct 13, 2021 5:02 pm
by Jou
BTW: See bug https://github.com/libjxl/libjxl/issues/727 and https://github.com/libjxl/libjxl/issues/426
There is a solution, manually tune the parameters.

Re: 0.99.1: JPEG-XL quality scale "0" confusion

Posted: Sun Nov 06, 2022 4:41 pm
by sobral
Could we have a "JPEG transcode" checkbox would enable lossless transcoding of legacy JPEGs? Let's say, in case the file is an old JPEG, the all other settings would be ignored.

To set the compression to 0 is quite confusing.

Thank you!

Re: 0.99.1: JPEG-XL quality scale "0" confusion

Posted: Mon Nov 14, 2022 10:06 pm
by Kadet
sobral wrote: Sun Nov 06, 2022 4:41 pm Could we have a "JPEG transcode" checkbox would enable lossless transcoding of legacy JPEGs? Let's say, in case the file is an old JPEG, the all other settings would be ignored.
+1

Re: 0.99.1: JPEG-XL quality scale "0" confusion

Posted: Sun Dec 04, 2022 1:49 pm
by xnview
currently transcoding is not supported