JPEG XL lossless compression parameters used?

Ask for help and post your question on how to use XnView MP.

Moderator: xnview

golemus
Posts: 137
Joined: Mon Dec 23, 2024 8:35 am

JPEG XL lossless compression parameters used?

Post by golemus »

Which parameters is XNView MP using for JPEG Lossless compression...? I am using compression level 7 (I think it was default..?)

I have been lately using also Image Magick (magick) for compressing jxl but for whatever reason I get larger files with imagemagick

magick input.jpg -auto-orient -quality 100 output.jxl
magick input.jpg -auto-orient -quality 100 -define jxl:effort=9 output.jxl


e.g. last experiment, simple timetable.png, size 160kB, XN MP makes it 116kB, with magick it becomes 145kB and even when putting max effort 9 it is still 136kB, larger than XN MP

I just updated magick to latest version, I think it has libjxl 0.12 or something. So most likely it should be even newer than one on XN MP...?
Kadet
Posts: 422
Joined: Thu Oct 20, 2022 7:23 pm

Re: JPEG XL lossless compression parameters used?

Post by Kadet »

XNView MP don't have this future.
Of course, many of us want lossless jpg to jxl transcoding (not to be confused with lossless encoding). We also want a few other parameters for jpeg-xl encoding, but the developer hasn't implemented these requests yet.
WinnieW
Posts: 57
Joined: Thu Jan 17, 2013 2:28 pm

Re: JPEG XL lossless compression parameters used?

Post by WinnieW »

JPG to JXL would be a data repacking, not a full format conversion. Which means, it's more like an lossless JPG transformation.
A JPG image doesn't have to be fully decoded for a conversation to JXL.
golemus
Posts: 137
Joined: Mon Dec 23, 2024 8:35 am

Re: JPEG XL lossless compression parameters used?

Post by golemus »

Yes. Essentially there is at least 3 different types of JPEG XL files.

- 1. lossy compression
- 2. lossless compression
- 3. jpeg xl --> jpeg compression

AFAIK all three are different sort of files and different algorithms

Which makes it sometimes difficult as you cannot infer only from file extension what is inside.

Ps. I am using multi-part extensions for jxl to make it a bit more easy.

.q8.jxl
.q7.jxl
.lo.jxl

Most of files I am compressing with quality 80 which is q8. When I want lossless compression I use .lo.jxl

For now I have not really used type 3. and thus don't know what kind of extension I should use for it.

Also in context of JXL maybe it is better to rethink concept of lossless compression. AFAIK typical program such as XNMP decompresses image and then reapplies a new algorithm without thinking what it is decompressed from.

So lets say you have 3MB jpg file you open it with XNMP and save as... JXL, lossless, you'd typically get maybe 10MB JXL file which is bit-identical.

Unless there are programs which sypport type 2. but don't support type 3. and there is no large difference in decoding speed then that does not make sense as by applying 3. you get also bit-identical file, but whose size is maybe 2.6-2.7MB or so. Not much savings but a little bit.
User avatar
masterjp
Posts: 652
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: JPEG XL lossless compression parameters used?

Post by masterjp »

I am using the JPEGXL format around 2 years for different pictures and compressions.

XN-ViewMP can read all JPEG XL compression types you decribed.
It can compress JPEGL XL with loseless and lossy compression.
JPEG XL loseless JPEG recompression is currently not available in XnvIewMP.

The best tool for this kind of conversion is XL converter (Freeware).
It is easy to use and self explaining. The installer of the program
install the GUI and all required encoders for all conversion types.

You can download it from: https://codepoems.eu/xl-converter
Also available at github.

This tool is using an older jpeg xl encoder version 0.10.5 from february 2025.
You can easily replace it without problems with the latest 0.12 stable release from july 2026.
I often use it for JPEG to JXL recompression and it works fine.

If you want to encode JPEG files with EXIF data, you should do some tests with example files.
I am not sure, if this conversion works perfect.

There are several speed improvements and multi-threading features in the latest release.

JPEG XL encoder - https://github.com/libjxl/libjxl
PC: Intel 8700k + Asus Z370-F + 48 GB RAM Corsair+G.Skill + Asus RTX 3050 OC
OS: Windows 11 Pro 64bit 25H2 |
GFX: XnViewMP 1.11.5 | Adobe Photoshop Elements 2024 + Elements XXL 11
Android 8-16: Samsung S7, S10, S23, TAB S7, S11, Ugoos AM7 TV-Box