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

Remove storage and use of low.jpg #821

Merged
merged 9 commits into from
Apr 25, 2024
Merged

Conversation

donaldgray
Copy link
Member

Resolves #813 (WDC-81)

This PR updates engine to no longer store low.jpg (a copy of the largest thumb regardless of accessibility). Instead we only store 1 single copy of each thumbnail and calculate the size when requested. This affects:

  • single-item manifest
  • NQ projection to manifest
  • NQ projection to pdf
  • NQ projection to zip archive

Refactored logic from IIIFCanvasFactory to introduce SizeClosestTo - this takes available sizes and target size.

Refactored thumb calculation logic from IIIFCanvasFactory, introduced in #810, into MetadataWithFallbackThumbSizeProvider : IThumbSizeProvider . This logic will:

  • Attempt to read thumb sizes from AssetApplicationMetadata. If found, return sizes. Else,
  • Read thumbs DeliveryChannelPolicy and calculate sizes on the fly - note only confined sizes are calculated

Also added a couple of helpers to make writing tests easier

@donaldgray donaldgray marked this pull request as ready for review April 24, 2024 15:19
@donaldgray donaldgray requested a review from a team as a code owner April 24, 2024 15:19
@donaldgray donaldgray merged commit ba4aeb5 into develop Apr 25, 2024
9 checks passed
@donaldgray donaldgray deleted the feature/remove_lowjpg branch April 25, 2024 09:43
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.

Do we store continue to store low.jpg?
2 participants