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

ENH: Add capability to replace image #1849

Merged
merged 45 commits into from
Jun 13, 2023
Merged

Conversation

pubpub-zz
Copy link
Collaborator

@pubpub-zz pubpub-zz commented May 20, 2023

add capability to replace images.
This allow capabililty to compress files reducing image quality
closes #1546

For the Reviewer

@pubpub-zz
Copy link
Collaborator Author

this PR consists in PR #1848 + new commit : 2d531d0

@codecov
Copy link

codecov bot commented May 20, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (2213b64) 93.73% compared to head (2e79ce9) 93.75%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1849      +/-   ##
==========================================
+ Coverage   93.73%   93.75%   +0.02%     
==========================================
  Files          34       34              
  Lines        6795     6817      +22     
  Branches     1338     1341       +3     
==========================================
+ Hits         6369     6391      +22     
  Misses        279      279              
  Partials      147      147              
Impacted Files Coverage Δ
pypdf/_page.py 91.44% <ø> (ø)
pypdf/_utils.py 100.00% <100.00%> (ø)

☔ 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 Author

@MartinThoma
All yours,
second PR to merge
coverage is fixed with the third one

pypdf/_utils.py Outdated Show resolved Hide resolved
pypdf/_utils.py Outdated Show resolved Hide resolved
pypdf/_utils.py Outdated Show resolved Hide resolved
@MartinThoma MartinThoma changed the title ENH : Add capability to replace image ENH: Add capability to replace image Jun 13, 2023
@MartinThoma MartinThoma added the is-feature A feature request label Jun 13, 2023
@MartinThoma MartinThoma merged commit 4a0d73f into py-pdf:main Jun 13, 2023
@MartinThoma
Copy link
Member

Awesome work @pubpub-zz 🥳 👏 Thank you 🙏

@finevine
Copy link

Thank you so much @pubpub-zz !!

MartinThoma added a commit that referenced this pull request Jun 18, 2023
New Features (ENH):
-  Extraction of inline images (#1850)
-  Add capability to replace image (#1849)
-  Extend images interface by returning an ImageFile(File) class (#1848)
-  Add set_data to EncodedStreamObject (#1854)

Bug Fixes (BUG):
-  Fix RGB FlateEncode Images(PNG) and transparency (#1834)
-  Generate static appearance for fields (#1864)

[Full Changelog](3.9.1...3.10.0)
@pubpub-zz pubpub-zz deleted the replace_images branch September 2, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-feature A feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable image compression
3 participants