0.99.1: JPEG-XL quality scale "0" confusion

*** Please report new bugs here! ***

Moderator: Dreamer

b2p
Posts: 1
Joined: Tue Oct 12, 2021 5:16 pm

0.99.1: JPEG-XL quality scale "0" confusion

Post 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"
Jou
Posts: 60
Joined: Sat Nov 03, 2007 9:38 pm

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

Post 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
Gaming in 4k / 6k / 8k / 15k / 16k? Yes! https://joumxyzptlk.de
Jou
Posts: 60
Joined: Sat Nov 03, 2007 9:38 pm

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

Post 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.
Gaming in 4k / 6k / 8k / 15k / 16k? Yes! https://joumxyzptlk.de