-
Notifications
You must be signed in to change notification settings - Fork 269
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 request: allow CCITT image encoding #691
Comments
https://gitlab.mister-muffin.de/josch/img2pdf/src/branch/main/src/img2pdf.py#L804 seems to do that for example |
Hi @eroux! Have you tried configuring image compression? If that does not fit your need, the feature you suggest would make for a great addition to Based on the 1.7 PDF spec, this would mean implementing support for
|
In the PDF spec the encoding I'm thinking of is |
PR on #695 |
I would like to be able to use the CCITT (TIFF) encoding for bitonal images. Currently these seem to be internally converted to grayscale pngs which produce a bigger output and requires more processing time. Now, for one or two files that is fine, but I'm in the process of creating PDFs for a few million images and the difference become really noticeable.
Here's an example:
producing the following pdf (10,985 bytes):
test-tiff.pdf
while I would expect the following one (produced with itext, 7,126 bytes, 35% smaller):
test-tiff-expected.pdf
The transformation into PNG can be seen through
pdfimages -all test-tiff.pdf test-tiff
that produces the followingtest-tiff-000.png
:The text was updated successfully, but these errors were encountered: