-
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: avoid altering images passed to FPDF.image() if there is no need to #693
Comments
Hi @eroux I am sorry but I am not sure to fully understand your intent here: (if you confirm that this your correct intent, we could rename this issue title accordingly) This would be possible for JPEG images, and CCITT/TIFF images I guess, but some images like PNG cannot be embedded in their native format in a PDF document. In terms of code, this would mean a refactoring in I don't personnally plan to work on this task, but you or other contributors are welcome to do so 😊 |
That's exactly the intent indeed |
@allcontributors please add @eroux for ideas |
I've put up a pull request to add @eroux! 🎉 |
(orignal title: "not parsing images when possible")
A feature I really love in img2pdf is the fact that it doesn't load and save the image if it doesn't need to. For our use case this means a huge performance gain and also in the tests I made, a gain in size of the PDF since re-compression doesn't always produce smaller pictures. See this function for instance to get the CCITT payload from a tiff file, so that it can then be copied directly without even having to look at it
The text was updated successfully, but these errors were encountered: