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

[Feature]: Aggressive image optimization without color quantization #1447

Open
user1823 opened this issue Dec 11, 2024 · 1 comment
Open
Assignees

Comments

@user1823
Copy link

Describe the proposed feature

Sometimes, I want to reduce the file size of the output PDF, especially when force-ocr produces a file much larger than the input PDF. For this, the currently recommended option is to use --optimize 2 or --optimize 3. These options indeed produce a smaller file size. However, they also use pngquant to quantize the colors. But, sometimes, accurate color reproduction is important to me and quantization causes the colors in the output to differ from the input.

So, I would request you to add a switch to disable color quantization even when --optimize 2 or --optimize 3 are used.

@jbarlow83
Copy link
Collaborator

Does --png-quality 100 help? That parameter is used to control pngquant. Maybe that is a quicker solution.

You can also remove pngquant from the environment by uninstalling or manipulating PATH. It only be used if ocrmypdf finds it.

@jbarlow83 jbarlow83 removed the triage Issue needs triage label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants