-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ENH: Add basic support for JBIG2 by using jbig2dec #3163
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
Conversation
This requires at least version 0.15 of |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3163 +/- ##
==========================================
+ Coverage 96.68% 96.69% +0.01%
==========================================
Files 53 53
Lines 8977 9024 +47
Branches 1664 1674 +10
==========================================
+ Hits 8679 8726 +47
Misses 176 176
Partials 122 122 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Good new functionality. The rationale for having
Because this function has |
I have more or less copied the existing filters and used the same approach here. For now, I would stay with the current approach and maybe discuss this in a dedicated issue, although there probably will not be much input about this and there is no real urgency to change the current approach in this regard. |
Appreciate all the added functionality.
Agree low urgency, and understandable good approach. Just opened the specification and of the ten filters, four do not have parameters: ASCIIHexDecode So I was mistaken about JBIG2Decode parameters, and think that keeping the argument is the right thing to do here for this PR (even though it is not used). So now we have three cases:
I may raise an issue as suggested, as think that removing the argument when not used by the PDF specification (2) will simplify this for pypdf developers and follow the design principle of moving semantics out of comments into code. |
What is the status? |
As mentioned in #1989 (comment), I am rather busy at the moment, thus bigger changes being a bit delayed. I hope to get this done this month. |
Hello @stefan6419846 "this month" is wonderfully to hear, not long-term, for now I'll just make a catch and skip those images. Thank you for your work. If I can help in a way. Let me know. |
As usual: You are of course invited to install pypdf from my branch and check if everything works as intended or if there are bigger issues. |
I hope to get around to that, I must admit that this library is totally new so my feedback might come too late. Thanks in advance. |
Currently, this fails with |
## What's new ### New Features (ENH) - Add basic support for JBIG2 by using jbig2dec (#3163) by @stefan6419846 ### Bug Fixes (BUG) - Fix crashes by removing unnecessary line (#3293) by @larsga - Add delimiters to NameObject.renumber_table (#3286) by @ztravis ### Robustness (ROB) - Handle DecodeParms being a NullObject (#3285) by @stefan6419846 ### Code Style (STY) - Update to mypy 1.16.0 (#3300) by @stefan6419846 [Full Changelog](5.5.0...5.6.0)
Closes #1989.