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 image extraction options #363

Merged
merged 4 commits into from
Mar 8, 2019
Merged

Add image extraction options #363

merged 4 commits into from
Mar 8, 2019

Conversation

adrg
Copy link
Collaborator

@adrg adrg commented Mar 8, 2019

  • Add options to ExtractPageImages extractor method
  • Skip extraction of inline stencil masks by default

Resolves #362

@codecov
Copy link

codecov bot commented Mar 8, 2019

Codecov Report

Merging #363 into v3 will increase coverage by 5.37%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##               v3    #363      +/-   ##
=========================================
+ Coverage   55.22%   60.6%   +5.37%     
=========================================
  Files         151     151              
  Lines       27218   27224       +6     
=========================================
+ Hits        15031   16498    +1467     
+ Misses      10341   10339       -2     
+ Partials     1846     387    -1459
Impacted Files Coverage Δ
pdf/extractor/image.go 79.13% <62.5%> (+12.15%) ⬆️
pdf/annotator/field_appearance.go 11.5% <0%> (+0.62%) ⬆️
pdf/creator/division.go 89.13% <0%> (+1.08%) ⬆️
pdf/model/outline.go 86.74% <0%> (+1.2%) ⬆️
pdf/creator/invoice.go 90.07% <0%> (+1.21%) ⬆️
pdf/model/sighandler/sighandler_rsa_sha1.go 6.75% <0%> (+1.35%) ⬆️
pdf/annotator/form_field.go 15% <0%> (+1.42%) ⬆️
pdf/model/annotations.go 23.08% <0%> (+1.48%) ⬆️
pdf/creator/toc_line.go 75.39% <0%> (+1.58%) ⬆️
pdf/creator/chapters.go 79.64% <0%> (+1.76%) ⬆️
... and 94 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dc0219...d478aea. Read the comment docs.

Copy link
Contributor

@gunnsth gunnsth left a comment

Choose a reason for hiding this comment

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

Looks good, one minor change needed.

@@ -12,10 +12,21 @@ import (
"github.com/unidoc/unidoc/pdf/model"
)

// ImageExtractOpts contains options for controlling image extraction from
// PDF pages.
type ImageExtractOpts struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use "Options" rather than "Opts" for consistency (Options used in elsewhere in unidoc).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@gunnsth gunnsth merged commit c41dd7e into unidoc:v3 Mar 8, 2019
@adrg adrg deleted the image-extract-opts branch March 11, 2019 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants