-
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
ENH: Add basic support for JBIG2 by using jbig2dec #3163
base: main
Are you sure you want to change the base?
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.53% 96.54% +0.01%
==========================================
Files 53 53
Lines 8914 8946 +32
Branches 1634 1639 +5
==========================================
+ Hits 8605 8637 +32
Misses 185 185
Partials 124 124 ☔ View full report in Codecov by Sentry. |
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. |
Closes #1989.