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 pages option #47

Merged
merged 4 commits into from
Dec 22, 2023
Merged

Add pages option #47

merged 4 commits into from
Dec 22, 2023

Conversation

opatiny
Copy link
Contributor

@opatiny opatiny commented Dec 22, 2023

  • refactor: remove I for interface and export TiffIfd
  • feat: add pages options

BREAKING CHANGE: removed firstImage option, use pages option insead

Closes: #46
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1e543c8) 79.18% compared to head (462bf5c) 79.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   79.18%   79.89%   +0.70%     
==========================================
  Files          12       12              
  Lines         543      562      +19     
  Branches      102      110       +8     
==========================================
+ Hits          430      449      +19     
  Misses        106      106              
  Partials        7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We should throw if pages contains invalid indexes (including out of range wrt the file being decoded)
  • We should not decode images that will be discarded. You can use the same trick as pageCount getter to skip decoding images.

src/tiffDecoder.ts Outdated Show resolved Hide resolved
@targos targos merged commit f0f0bac into main Dec 22, 2023
6 checks passed
@targos targos deleted the removeI branch December 22, 2023 11:26
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