JXL - lossless JPG recompression?

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderator: xnview

milosav0
Posts: 1
Joined: Fri Aug 14, 2026 3:02 am

JXL - lossless JPG recompression?

Post by milosav0 »

Enabling lossless .jxl output should net me approximately -20% file size when converting .jpg thanks to the formats famous lossless .jpg recompression, so why do I end up with +250% file size? What option have I foolishly enabled? I haven't a clue!
User avatar
user0
XnThusiast
Posts: 3067
Joined: Sat May 09, 2015 9:37 am

Re: JXL - lossless JPG recompression?

Post by user0 »

there is no lossless JPEG-to-JXL transcoding in the app
according to About>Plugins libJPEGXL.dll is only used for reading

in theory it should work with JPEG XL Write options: Lossless + any Compression level in
  • XnConvert
    - if no Actions added
  • XnViewMP
    - in Browser > Export
    - in Browser > file context menu > Convert into
    - (maybe) in Browser/Viewer > Lossless transformations (JPEG) > new command (ignoring Write options)


ps: so far you can do it manually with libjxl:

Code: Select all

# default behavior - lossless JPEG transcoding
cjxl input.jpg output.jxl

# explicit flag for lossless JPEG transcoding
cjxl --lossless_jpeg=1 input.jpg output.jxl

# shortcut flag
cjxl -j 1 input.jpg output.jxl

'Compression' level [1-10] also does not prevent lossless transcoding

Code: Select all

 -e EFFORT, --effort=EFFORT
    Encoder effort setting. Range: 1 .. 10.
    Default: 7. Higher numbers allow more computation at the expense of time.
    For lossless, generally it will produce smaller files.
    For lossy, higher effort should more accurately reach the target quality.