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

BUG: Convert color space before saving #1802

Merged
merged 7 commits into from
Apr 19, 2023
Merged

BUG: Convert color space before saving #1802

merged 7 commits into from
Apr 19, 2023

Conversation

MartinThoma
Copy link
Member

The PDF contained an image in PA mode:

  • P: 8-bit pixels, mapped to any other mode using a color palette
  • PA: P with alpha

See #1801

The PDF contained an image in PA mode:
* P: 8-bit pixels, mapped to any other mode using a color palette
* PA: P with alpha

See #1801
@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f8295a9) 93.38% compared to head (f79f173) 93.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1802   +/-   ##
=======================================
  Coverage   93.38%   93.39%           
=======================================
  Files          34       34           
  Lines        6604     6612    +8     
  Branches     1300     1301    +1     
=======================================
+ Hits         6167     6175    +8     
  Misses        285      285           
  Partials      152      152           
Impacted Files Coverage Δ
pypdf/filters.py 95.62% <100.00%> (+0.10%) ⬆️

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pubpub-zz
Copy link
Collaborator

is the PNG the best choice or should we use JPEG2000?

@MartinThoma
Copy link
Member Author

@pubpub-zz I don't know where. But with my fix it looks good now :-)

@MartinThoma
Copy link
Member Author

Maybe I should add some extracted images + make a visual diff 🤔 It's currently too easy to silently break something here

pypdf/filters.py Outdated Show resolved Hide resolved
@MartinThoma MartinThoma merged commit bd140cb into main Apr 19, 2023
@MartinThoma MartinThoma deleted the issue-1801 branch April 19, 2023 16:44
MartinThoma added a commit that referenced this pull request Apr 23, 2023
Bug Fixes (BUG)
-  Convert color space before saving (#1802)

Documentation (DOC)
-  PDF/A (#1807)
-  Use append instead of add_page
-  Document core mechanics of pypdf (#1783)

[Full Changelog](3.8.0...3.8.1)
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.

2 participants