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 alpha channel support fo png files #614

Merged
merged 2 commits into from Apr 6, 2022

Conversation

mohamedali-zorgati1997
Copy link
Contributor

No description provided.

@MartinThoma MartinThoma added Tiny Pull requests that make a tiny change - and thus should be easy to merge workflow-images From a users perspective, image handling is the affected feature/workflow labels Apr 6, 2022
@MartinThoma
Copy link
Member

Do you happen to have an example PDF which shows the difference? What does it mean that alpha channel is now supported?

@mohamedali-zorgati1997
Copy link
Contributor Author

I just created this PDF file and it is a perfect example. Try to extract the image inside with and without the change I made and you will see the difference.
The alpha channel is the transparency mask in PNG files, so when extracting PNG images without the alpha channel, the transparent areas will show in black.

@MartinThoma MartinThoma merged commit 90d5539 into py-pdf:master Apr 6, 2022
@MartinThoma
Copy link
Member

Nice! Thank you for your contribution!

There was a tiny typo which I fixed - besides that, it looks good!

@MartinThoma
Copy link
Member

Thank you very much that you took the time to respond, although it took a year until you've got a reaction 🤗

@mohamedali-zorgati1997
Copy link
Contributor Author

Always happy to be of service.

MartinThoma added a commit that referenced this pull request Apr 7, 2022
Features:

 - Add alpha channel support for png files in Script (#614)

Bug fixes (BUG):

 - Fix formatWarning for filename without slash (#612)
 - Add whitespace between words for extractText() (#569, #334)
 - "invalid escape sequence" SyntaxError (#522)
 - Avoid error when printing warning in pythonw (#486)
 - Stream operations can be List or Dict (#665)

Documentation (DOC):

 - Added Scripts/pdf-image-extractor.py
 - Documentation improvements (#550, #538, #324, #426, #394)

Tests and Test setup (TST):

 - Add Github Action which automatically run unit tests via pytest and
   static code analysis with Flake8 (#660)
 - Add several unit tests (#661, #663)
 - Add .coveragerc to create coverage reports

Developer Experience Improvements (DEV):

 - Pre commit: Developers can now `pre-commit install` to avoid tiny issues
               like trailing whitespaces

Miscallenious:

 - Add the LICENSE file to the distributed packages (#288)
 - Use setuptools instead of distutils (#599)
 - Improvements for the PyPI page (#644)
 - Python 3 changes (#504, #366)

You can see the full changelog at: 1.26.0...1.27.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tiny Pull requests that make a tiny change - and thus should be easy to merge workflow-images From a users perspective, image handling is the affected feature/workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants