Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(MINOR) IngredientOptions allow override of hash and thumbnail generation; image library is now a default feature #79

Merged
merged 11 commits into from
Jul 19, 2022

Conversation

gpeacock
Copy link
Collaborator

Changes in this pull request

IngredientOptions is now a trait with three methods to override title, hash and thumbnail generation
The blake3 hash is no longer built in, if a hash is desired it can be added via ingredientOptions.
add_thumbnails feature now controls if the image crate is included in a build, by default it is enabled
updated to latest image library
added additional file type/mime mappings for ingredients

Checklist

  • This PR represents a single feature, fix, or change.
  • All applicable changes have been documented.
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2022

Codecov Report

Merging #79 (9efe7fc) into main (4ef2f1b) will decrease coverage by 0.08%.
The diff coverage is 78.74%.

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
- Coverage   74.50%   74.42%   -0.09%     
==========================================
  Files          66       66              
  Lines       13471    13565      +94     
==========================================
+ Hits        10037    10096      +59     
- Misses       3434     3469      +35     
Impacted Files Coverage Δ
sdk/src/error.rs 14.28% <ø> (ø)
sdk/src/lib.rs 100.00% <ø> (ø)
sdk/src/openssl/temp_signer_async.rs 91.11% <ø> (ø)
sdk/src/validator.rs 54.54% <ø> (ø)
make_test_images/src/make_test_images.rs 67.50% <25.80%> (-5.99%) ⬇️
sdk/src/ingredient.rs 89.02% <81.73%> (-2.38%) ⬇️
sdk/src/manifest.rs 89.65% <97.05%> (+1.45%) ⬆️
sdk/src/utils/thumbnail.rs 100.00% <100.00%> (ø)
sdk/src/openssl/ec_signer.rs 86.18% <0.00%> (-1.32%) ⬇️

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 fab9652...9efe7fc. Read the comment docs.

@gpeacock
Copy link
Collaborator Author

This is required for allowing PS to not generate thumbnails via the cai-helper
Also allows for removal or replacement of the default thumbnail generation code.
Removes blake3 ingredient hash from sdk, developers can now supply their own if needed.

@scouten-adobe scouten-adobe changed the title IngredientOptions allow override of hash and thumbnail generation, image library is now a default feature (MINOR) IngredientOptions allow override of hash and thumbnail generation; image library is now a default feature Jul 16, 2022
@gpeacock gpeacock requested a review from scouten-adobe July 19, 2022 04:14
@scouten-adobe scouten-adobe changed the title (MINOR) IngredientOptions allow override of hash and thumbnail generation; image library is now a default feature (MINOR) IngredientOptions allow override of hash and thumbnail generation; image library is now a default feature Jul 19, 2022
Copy link
Collaborator

@mauricefisher64 mauricefisher64 left a comment

Choose a reason for hiding this comment

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

👍

@gpeacock gpeacock merged commit ff29356 into main Jul 19, 2022
@gpeacock gpeacock deleted the gpeacock/add_thumbnails_feature branch July 19, 2022 22:28
mauricefisher64 added a commit that referenced this pull request Jul 20, 2022
…timize

* 'main' of https://github.com/contentauth/c2pa-rs:
  (MINOR) `IngredientOptions` allow override of hash and thumbnail generation; image library is now a default feature (#79)
  Prepare 0.9.1 release
  Fix publish workflow (#82)
  Prepare 0.9.0 release
  (MINOR) Introduce a new `SigningAlg` enum (#76)

# Conflicts:
#	sdk/src/ingredient.rs
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants