jpegli - new and clever jpeg encoder

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

pokuly
Posts: 18
Joined: Fri Aug 25, 2017 7:22 pm

jpegli - new and clever jpeg encoder

Post 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
User avatar
masterjp
Posts: 471
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: jpegli - new and clever jpeg encoder

Post 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. :D
PC: Intel 8700k + Asus Z370-F + 16 GB RAM G.Skill + Asus RTX 3050 OC + Samsung SSD
OS: Windows 10 Pro 64bit 22H2 |
GFX: XnViewMP 1.8.7 | XN-View 2.52.0 | XnConvert 1.104.0 | Adobe Photoshop Elements 2024 | Elements XXL 11 | Paint.Net 5.1.7
pokuly
Posts: 18
Joined: Fri Aug 25, 2017 7:22 pm

Re: jpegli - new and clever jpeg encoder

Post 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.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: jpegli - new and clever jpeg encoder

Post by xnview »

so you would like to have jpegli as an optimizer in XnView MP?
Pierre.
User avatar
masterjp
Posts: 471
Joined: Fri Feb 13, 2009 4:37 pm
Location: Duesseldorf, Germany

Re: jpegli - new and clever jpeg encoder

Post 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.
PC: Intel 8700k + Asus Z370-F + 16 GB RAM G.Skill + Asus RTX 3050 OC + Samsung SSD
OS: Windows 10 Pro 64bit 22H2 |
GFX: XnViewMP 1.8.7 | XN-View 2.52.0 | XnConvert 1.104.0 | Adobe Photoshop Elements 2024 | Elements XXL 11 | Paint.Net 5.1.7
cday
XnThusiast
Posts: 4394
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: jpegli - new and clever jpeg encoder

Post 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?
pokuly
Posts: 18
Joined: Fri Aug 25, 2017 7:22 pm

Re: jpegli - new and clever jpeg encoder

Post 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.
cday
XnThusiast
Posts: 4394
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: jpegli - new and clever jpeg encoder

Post 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.
pokuly
Posts: 18
Joined: Fri Aug 25, 2017 7:22 pm

Re: jpegli - new and clever jpeg encoder

Post by pokuly »

Guetzli can't do anything but 1x1,1x1,1x1. If the ouput is different it isn't a guetzli file.
cday
XnThusiast
Posts: 4394
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: jpegli - new and clever jpeg encoder

Post 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?
forklab
Posts: 40
Joined: Tue Mar 02, 2021 7:27 pm

Re: jpegli - new and clever jpeg encoder

Post 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 :(
pokuly
Posts: 18
Joined: Fri Aug 25, 2017 7:22 pm

Re: jpegli - new and clever jpeg encoder

Post by pokuly »

After the plugin installed i restarted XnView MP x64 and then there is "JPG Guetzli JPEG" as option under Save As.
forklab
Posts: 40
Joined: Tue Mar 02, 2021 7:27 pm

Re: jpegli - new and clever jpeg encoder

Post 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.
pokuly
Posts: 18
Joined: Fri Aug 25, 2017 7:22 pm

Re: jpegli - new and clever jpeg encoder

Post 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.
cday
XnThusiast
Posts: 4394
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: jpegli - new and clever jpeg encoder

Post 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;
Post Reply