Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-sample 1x1 and default quality #427

Open
ccxvii opened this issue Nov 16, 2022 · 2 comments
Open

-sample 1x1 and default quality #427

ccxvii opened this issue Nov 16, 2022 · 2 comments

Comments

@ccxvii
Copy link

ccxvii commented Nov 16, 2022

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?

@kornelski
Copy link
Member

It ends up using different quantization tables, due to the fact that the libjpeg API is stateful and the cjpeg tool is a kludge.

@FredWahl
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants