-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
BUG: Fix RGB FlateEncode Images(PNG) and transparency #1834
Conversation
Number of colors were not taken into account to process PNG Images also properly process mask to transparency closes py-pdf#1787
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1834 +/- ##
=======================================
Coverage ? 93.79%
=======================================
Files ? 34
Lines ? 6919
Branches ? 1364
=======================================
Hits ? 6490
Misses ? 280
Partials ? 149
☔ View full report in Codecov by Sentry. |
test images ; from pdf_font_garbled.pdf: Image45 part of resources in TPL2 in 2nd page (jp2 file => zipped to stored) (JPG + transparency => JP2) |
tiff predictor 2: |
@pubpub-zz This PR introduces two changes: (1) The bugfix and (2) the new interface. Could you please make a second PR just with the bugfix? I feel like that one can be merged today/tomorrow, but I want to have another look at the new interface. |
For tracking I've isolated the new images and 2 other PR following : inline_images and new function to replace images. However I'm not inclined to process only the bugs ones appart : I've worked all changes at the same time and I would not like to introduce regressions with a mod not being correctly reported. |
@pubpub-zz I messed something up when I fixed the merge conflicts 🙈
|
@pubpub-zz Can you please help me? I have no idea where to look 🙈 |
under analysis. |
shoud be fixed. I had to upgrade pillow to 9.5 for python 3.11 |
Thank you 🙏 I'm quickly checking if any of the other PRs is ready to merge and will make a release in less than an hour. This time we have awesome improvements for image handling thanks to your efforts. That was really good work 👍 🤗 |
New Features (ENH): - Extraction of inline images (#1850) - Add capability to replace image (#1849) - Extend images interface by returning an ImageFile(File) class (#1848) - Add set_data to EncodedStreamObject (#1854) Bug Fixes (BUG): - Fix RGB FlateEncode Images(PNG) and transparency (#1834) - Generate static appearance for fields (#1864) [Full Changelog](3.9.1...3.10.0)
Take the number of colors into account for PNG images
Properly process the mask for transparency:
Fixes #1787
Fixes #1599
Adds support for inline images extraction:
Fixes #1368
Fixes #1863
Additional changes: