guetzli icon indicating copy to clipboard operation
guetzli copied to clipboard

Which file can setting quality >= 84 ?

Open joehk2017 opened this issue 8 years ago • 7 comments

Hi ,

i want make my guetzli can setting quality under <=84 , where can i find it ? , thank !

joehk2017 avatar Mar 18 '17 09:03 joehk2017

Guetzli algorithm is beneficial only for this quality or higher. If you work around it and lower the quality, you'll only waste your time generating average JPEGs, without Guetzli improvement.

If you need even smaller files and can tolerate bigger distortions, MozJPEG is a better choice for quality < 80.

kornelski avatar Mar 18 '17 12:03 kornelski

thank for your mozjpeg , but if guetzli can do it why i need to use other ?

joehk2017 avatar Mar 18 '17 14:03 joehk2017

Because Guetzli can't do it. Guetzli is designed to only work on very very high quality range.

kornelski avatar Mar 18 '17 14:03 kornelski

but the guetzli report me if i range under 84 need to edit the source code

joehk2017 avatar Mar 18 '17 14:03 joehk2017

And if you do that, you'll get a bad encoder. Quality depends not only on that number, but a lot of other fine-tuned constants in the code.

The limit was not put there to make you edit the code. The limit was put there, because the authors have measured it and found it doesn't work well with lower numbers.

kornelski avatar Mar 18 '17 14:03 kornelski

It's been a month, but this answer doesn't appear to satisfy the intent/drive of the original question. I realize there is an error message that says, if you want this limit changed, you will have to change the source code. So here we are. In support of the tinkerer's spirit...

Here's the limit in the code: processor.cc#L791 (Although removing it probably only gets you the ability to try 70 at the lowest, because every other quality setting below that isn't defined anywhere. This second file defines every Quality number in terms of a Butteraugli score: link)

Here is somebody who actually removed the limit, and the results they got compressing the example, "bee" image: https://github.com/google/guetzli/issues/57#issuecomment-287510997

P.S. I appreciate pornel's technical answer because it does appear to be ultimately the correct one. Still, curiosity and drive should be rewarded with something, IMO.

DeeDeeG avatar Apr 24 '17 07:04 DeeDeeG

MozJpeg is indeed better at lower quality... tried with q80 resulting in a file 87.8kb, while mozJpeg's was 81.8kb on med/auto https://imageoptim.com/mozjpeg

Zoomed png below: Moz on left, Guertzli on right screenshot from 2017-06-04 19-07-10

FossPrime avatar Jun 05 '17 00:06 FossPrime