-sample 1x1 and default quality
ccxvii opened this issue · comments
The docs say default quality is 75.
When using stock cjpeg, both these commands result in identical output:
cjpeg -sample 1x1
cjpeg -sample 1x1 -q 75
However, with mozjpeg these two commands result in very different output.
What exactly is going on here?
It ends up using different quantization tables, due to the fact that the libjpeg API is stateful and the cjpeg tool is a kludge.
My problem is that I seem to get quality equal to 75 even if I used -quality 80. I don’t know if it matters if -sample 1x1 should come before or after -quality. My own code said quality was 65 rather then the 75 I got from an online tool which makes me wonder if there’s any tool that could return the estimated quality which I can use in my code