-
Notifications
You must be signed in to change notification settings - Fork 253
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
Bitonal images are now encoded using CCITTFaxDecode - fix #691 #695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @eroux!
For reference, basic support for monochromatic images was initially introduced on september last year: #527
Some minor issues were spotted by Pylint in the GitHub Actions pipeline, could you please fix them?
fpdf/image_parsing.py:136:0: C0303: Trailing whitespace (trailing-whitespace)
fpdf/image_parsing.py:73:12: W0105: String statement has no effect (pointless-string-statement)
fpdf/image_parsing.py:200:12: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
I've addressed your comments (all of them I think?) |
I think there are a few ones left 😊
Have you checked our documentation regarding development on the project? I think you just need to |
Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
Could you please format the code with
|
I did reformat it with black, thanks! There's an issue when I try to install the test dependencies so I still can't run the unit tests, but I'll try on another system |
@Lucas-C I finally managed to launch the tests, the only that fails on my machine is the performance comparison, I don't know what the value of 0.3s is computed, but on my computer fpdf is too fast to pass the test(!), is that a problem? |
It's OK, don't worry, as long as the unit tests pass in the GitHub Actions pipelines that's fine 😊 I think this PR is close to be ready to be merged! |
Great, thanks! The impact is that all bitonal images are now encoded in CCITT by default and these contain some bitonal images |
Codecov ReportBase: 93.93% // Head: 93.77% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #695 +/- ##
==========================================
- Coverage 93.93% 93.77% -0.17%
==========================================
Files 26 26
Lines 6780 6829 +49
Branches 1206 1216 +10
==========================================
+ Hits 6369 6404 +35
- Misses 242 251 +9
- Partials 169 174 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@allcontributors please add @eroux for code |
I've put up a pull request to add @eroux! 🎉 |
Merged! |
Fixes #691
I couldn't run the tests through pytest for some reason:
Checklist:
The GitHub pipeline is OK (green),
meaning that both
pylint
(static code analyzer) andblack
(code formatter) are happy with the changes of this PR.A unit test is covering the code added / modified by this PR
This PR is ready to be merged
[Not Applicable] In case of a new feature, docstrings have been added, with also some documentation in the
docs/
folderA mention of the change is present in
CHANGELOG.md
By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.