jpegli - new and clever jpeg encoder

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

barrykwok
Posts: 1
Joined: Thu Apr 11, 2024 8:02 am

Re: jpegli - new and clever jpeg encoder

Post by barrykwok »

Nice job!!!
I am trying to convert a 16bit tiff to jpegli, and I got the warning "The picture will be converted to RGB with 8bits per component", is it possible to convert it to 10bit or above?
Thank you very much!
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 »

barrykwok wrote: Thu Apr 11, 2024 8:08 am Nice job!!!
I am trying to convert a 16bit tiff to jpegli, and I got the warning "The picture will be converted to RGB with 8bits per component", is it possible to convert it to 10bit or above?
Thank you very much!
no only 8bits
Pierre.
User avatar
j7n
Posts: 19
Joined: Tue Mar 03, 2020 7:28 am

Re: jpegli - new and clever jpeg encoder

Post by j7n »

I'm surprised that there is next to no apparent color smearing with the XYB output, which by default has chroma subsampling. I picked the nastiest blue and red combination I could find, and I only saw a faint white glow. I wouldn't use this format because it relies on ICC to fix up the colors afterwards. This requires a recent version of an ICC engine. Old software like Photoshop CS2 or old FastStone show wrong colors. When it works, ICC (any) is sometimes an order of magitude slower to load. Irfan is very slow.

The benefit of this encoder is supposedly extra bit depth because it does intermediate calculations at a higher precision. So it an encode artifical gradients better. However, I don't see it. A 16-bit input gradient has significant banding. The cjpegli.exe doesn't seem to apply any dithering (jpeg output is very small). Dithered 8-bit input has the same overall banding in cjpegLI, Irfan and Photoshop. So saving from 16-bit directly seems to be a bad idea.

They have an EXE encoder on Git, which can be used from an audio frontend. In only supports PNG and Linux PNM image formats for input. No BMP, TGA or EXR.

gradient_16.png
gradient_16.png
gradient_16.png (48.07 KiB) Viewed 1918 times
gradient_16_LI.jpg
gradient_16_LI.jpg
gradient_16_LI.jpg (2.8 KiB) Viewed 1918 times
gradient_8_dither_photoshop.jpg
gradient_8_dither_photoshop.jpg
gradient_8_dither_photoshop.jpg (7.16 KiB) Viewed 1918 times
gradient_8_dither_LI.jpg
gradient_8_dither_LI.jpg
gradient_8_dither_LI.jpg (5.54 KiB) Viewed 1918 times
gradient_8_dither_irfan.jpg
gradient_8_dither_irfan.jpg
gradient_8_dither_irfan.jpg (8.12 KiB) Viewed 1918 times
512_16_srgb_LI.jpg
512_16_srgb_LI.jpg
512_16_srgb_LI.jpg (177.93 KiB) Viewed 1918 times
512_16_xyb_ss_LI.jpg
512_16_xyb_ss_LI.jpg
512_16_xyb_ss_LI.jpg (129.58 KiB) Viewed 1918 times
512_16_horrible_chromass_jpegturbo.jpg
512_16_horrible_chromass_jpegturbo.jpg
512_16_horrible_chromass_jpegturbo.jpg (115.68 KiB) Viewed 1918 times
Kadet
Posts: 208
Joined: Thu Oct 20, 2022 7:23 pm

Re: jpegli - new and clever jpeg encoder

Post by Kadet »

xnview wrote: Wed Apr 10, 2024 7:01 am
Kadet wrote: Tue Apr 09, 2024 8:13 pm I did one more test — In XnView I turned off the Progressive option, which should result in a file that is a few kilos larger. It wasn't bigger. Therefore, I conclude that the selected Progressive option does not translate into jpegli parameters in XnView.
In cjpegli this is the "-p N" parameter N = 0..2.
When I added "-p 0" to cjpegli, the file grew to the size produced by XnView,
right, i'll update it
I'm looking forward to fixing this issue.
Pierre, can you release version 1.7.2 or beta?
Thank you.
Kadet
Posts: 208
Joined: Thu Oct 20, 2022 7:23 pm

Re: jpegli - new and clever jpeg encoder

Post by Kadet »

Progressive work OK like in cjpegli.
XYB work OK like in cjpegli.
Tapio
Posts: 58
Joined: Fri Oct 05, 2018 11:36 am

Re: jpegli - new and clever jpeg encoder

Post by Tapio »

pokuly wrote: Sat Mar 16, 2024 2:29 pm 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
Having trouble finding a binary. Gone? Need Ubuntu binary for another project. Thx
Post Reply