Skip to content
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

Add support for monochromatic images (PIL image.mode == '1') #527

Merged
merged 8 commits into from
Sep 13, 2022

Conversation

GerardoAllende
Copy link

@GerardoAllende GerardoAllende commented Sep 11, 2022

Added support for monochromatic images (PIL image.mode == '1')

Checklist:

  • The GitHub pipeline is OK (green),
    meaning that both pylint (static code analyzer) and black (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

  • In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder

  • A 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.

Removed unnecessary import
@Lucas-C
Copy link
Member

Lucas-C commented Sep 12, 2022

This looks great, thank you for your contribution @GerardoAllende!
If the GitHub Actions checks pass, I'll merge this PR as it its!

@allcontributors please add @GerardoAllende for code

@allcontributors
Copy link

@Lucas-C

I've put up a pull request to add @GerardoAllende! 🎉

@Lucas-C
Copy link
Member

Lucas-C commented Sep 12, 2022

Oh, seems like you haven't run black on the code:

Run black --check .
would reformat fpdf/image_parsing.py

Oh no! 💥 💔 💥
1 file would be reformatted, 134 files would be left unchanged.

Please follow those steps to fix this:
https://pyfpdf.github.io/fpdf2/Development.html#code-auto-formatting

@GerardoAllende
Copy link
Author

Please follow those steps to fix this:
https://pyfpdf.github.io/fpdf2/Development.html#code-auto-formatting

Done

@GerardoAllende GerardoAllende marked this pull request as draft September 12, 2022 20:44
@GerardoAllende GerardoAllende marked this pull request as ready for review September 12, 2022 23:08
@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #527 (75533cc) into master (a2ed1d5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #527   +/-   ##
=======================================
  Coverage   94.09%   94.10%           
=======================================
  Files          22       22           
  Lines        6200     6206    +6     
  Branches     1263     1265    +2     
=======================================
+ Hits         5834     5840    +6     
  Misses        191      191           
  Partials      175      175           
Impacted Files Coverage Δ
fpdf/image_parsing.py 88.69% <100.00%> (+0.62%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Lucas-C
Copy link
Member

Lucas-C commented Sep 13, 2022

#530 has been solved

Could you please rebase your branch on master @GerardoAllende?
That should solve the failing GitHub Action pipeline 😊

@Lucas-C Lucas-C merged commit 378a98a into py-pdf:master Sep 13, 2022
@Lucas-C
Copy link
Member

Lucas-C commented Sep 13, 2022

Merged!
Thank you for your contribution @GerardoAllende

@GerardoAllende
Copy link
Author

Thank you for your guidance and support!

@Lucas-C Lucas-C mentioned this pull request Feb 16, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants