Page 1 of 3
jpegli - new and clever jpeg encoder
Posted: Tue Mar 12, 2024 2:27 pm
by pokuly
There is a new king in town!
jpegli does really well and shows jpeg ain't dead yet. It is fast also.
https://github.com/libjxl/libjxl/tree/main/lib/jpegli
Visual comparisons imho show jpegli more robust and efficient as guetzli and miles ahead of mozjpeg quality.
Unfortunately Xnview/imagemagick quality estimination clearly shows misleading low values as it shows misleading high numbers for guetzli.
Edit: Irfanview shows the correct Q setting for jpegli and guetzli
Re: jpegli - new and clever jpeg encoder
Posted: Sat Mar 16, 2024 9:28 am
by masterjp
I first saw the new jpegli encoder in the freeware xl converter 0.98 (picture conversion tool)
https://codepoems.eu/xl-converter/
The results of the new jpeg encoder jpegli are fantastic! The high visual quality and extreme compression are at the same level
as WEBP / AVIF and nearby JPEG XL. The compatibility is unbelievable good! I can open the files on different systems (android)
and programs (e.g. photoshop) without errors. The conversion speed is super fast and faster than webp/avif/jpeg xl.
Maybe Pierre can add it as further alternative jpeg encoder.

Re: jpegli - new and clever jpeg encoder
Posted: Sat Mar 16, 2024 2:29 pm
by pokuly
In libjxl v0.10.2 is a cjpegli.exe that produces 100% valid jpg files.
https://github.com/libjxl/libjxl/releases/tag/v0.10.2
The only reason why the produced files may be incompatible is it creates progressive files by default.
Already a year back at an early stage jpegli tested very well and now one year later it feels really robust.
Some OT to the Quality estimate. irfanview always calculates the correct Q value for jpegli. For guetzli there are outliers.
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 8:35 am
by xnview
so you would like to have jpegli as an optimizer in XnView MP?
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 12:20 pm
by masterjp
I would like to use the JPEG LI Encoder in XnViewMP preferred for batch conversions. A further 'export to JPEG-LI' entry in file menu is not required.
Later you can add it in XnConvert, too.
The JPEG LI encoder (cjpegli.exe executeable file) needs a special uncompressed picture file format (e.g. PNG) as source file.
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 1:30 pm
by cday
masterjp wrote: Mon Mar 18, 2024 12:20 pm
I would like to use the JPEG LI Encoder in XnViewMP preferred for batch conversions. A further 'export to JPEG-LI' entry in file menu is not required.
Later you can add it in XnConvert, too.
The JPEG LI encoder (cjpegli.exe executeable file) needs a special uncompressed picture file format (e.g. PNG) as source file.
That will cause a problem, I think, unless it can be clearly indicated in the file save format listing, which could be difficult?
Possibly a warning on clicking save when the source file is
not an uncompressed picture file format (e.g. PNG)?
Or, won't a file open in XnView MP always be uncompressed when saved?
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 3:39 pm
by pokuly
When we are at it.
Saving a jpg file as "JPG - Guetzli" in XnView MP uses the long time the guetzli encoder needs but saves a different file. Guetzli has always sub-sampling 1x1,1x1,1x1 but when i just tried it creates a sub-sampling 2x2,1x1,1x1 file with the size of the default jpg encoder.
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 5:10 pm
by cday
pokuly wrote: Mon Mar 18, 2024 3:39 pm
Saving a jpg file as "JPG - Guetzli" in XnView MP uses the long time the guetzli encoder needs but saves a different file. Guetzli has always sub-sampling 1x1,1x1,1x1 but when i just tried it creates a sub-sampling 2x2,1x1,1x1 file with the size of the default jpg encoder.
I believe that JPG - Guetzli was introduced to reduce the size of web images, for which the rapid increase in processing time as image dimensions increase would not be a consideration, and equally the higher image quality resulting from 1x1,1x1,1x1 sub-sampling also wouldn't be needed.
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 5:15 pm
by pokuly
Guetzli can't do anything but 1x1,1x1,1x1. If the ouput is different it isn't a guetzli file.
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 8:02 pm
by cday
pokuly wrote: Mon Mar 18, 2024 5:15 pm
Guetzli can't do anything but 1x1,1x1,1x1. If the ouput is different it isn't a guetzli file.
Right, I misread your post, if it should use 1x1,1x1,1x1 sub-sampling, presumably because overall that is optimal for outputting small files of acceptable quality, but doesn't in your tests then you are reporting that as installed it isn't working correctly?
Re: jpegli - new and clever jpeg encoder
Posted: Mon Mar 18, 2024 11:01 pm
by forklab
Voting for jpegli too! If it will create better compressed files with better quality and speed - there is no question. Yes, of course!
pokuly wrote: Mon Mar 18, 2024 3:39 pmSaving a jpg file as "JPG - Guetzli" in XnView MPsampling
Can you tell me (in PM?) how to use Guetzli encoder? I installed it from Tools>Plugins and can't find it anywhere
viewtopic.php?p=196944#p196944 
Re: jpegli - new and clever jpeg encoder
Posted: Tue Mar 19, 2024 12:34 am
by pokuly
After the plugin installed i restarted XnView MP x64 and then there is "JPG Guetzli JPEG" as option under Save As.
Re: jpegli - new and clever jpeg encoder
Posted: Tue Mar 26, 2024 5:49 am
by forklab
pokuly wrote: Tue Mar 19, 2024 12:34 amAfter the plugin installed i restarted XnView MP x64 and then there is "JPG Guetzli JPEG" as option under Save As.
Not working for me.
Re: jpegli - new and clever jpeg encoder
Posted: Wed Mar 27, 2024 3:35 am
by pokuly
I doubt you miss much.
I personaly was surprised when guetzli was new about the idea behind. Unfortunately guetzli sometimes creates blocks and borders that doesn't belong there so i stopped using it.
When i remember right these issues were reported to the devs but not fixed after release because they were busy with other projects.
Re: jpegli - new and clever jpeg encoder
Posted: Wed Mar 27, 2024 7:15 am
by cday
Some basic and rather surprising information on Guetzli in the
Wikipedia Guetzli entry:
o Guetzli is resource-intensive, requiring orders of magnitude more processing time and random-access memory than other JPEG encoders;
o Guetzli supports only the top of JPEG's quality range (quantizer settings 84–100);
o Guetzli is more effective with bigger files;
o Good quality image requires larger image dimensions and conversion times are then incredibly slow;
o Two tests found that Guetzli is very slow (about 4 magnitudes slower than normal JPEG encoder) and not necessarily better than mozjpeg.
o Google says it is a demonstration of the potential of psychovisual optimizations, intended to motivate further research into future JPEG encoders;