api icon indicating copy to clipboard operation
api copied to clipboard

Use case for minimum dimension as size constraint in future IIIF Image API version

Open beaudet opened this issue 4 years ago • 2 comments

The programs at the National Gallery often use Collection images for their events and we want to use any collection image for the calendar's thumbnails. The thumbnails are set as a background-image on a 250px square container, which automatically crops excess image. By default, it shows the center of the image, but we can also set up an extra control that uses CSS to set a focal point for the cropping (e.g. upper right, lower right, etc). However, we would ideally like to be able to formulate a IIIF Image URL that produces an image with the largest dimension free to scale and the smallest dimension a minimum size. The temporary solution involves a call to info.json to compare the width and the height, followed by formulation of a URL that specifies the size of the smaller of (width | height) while allowing the other dimension to scale freely. Ideally, this would be possible with a direct IIIF Image API URL.

beaudet avatar May 14 '21 16:05 beaudet

Thanks David! Can you look to see if this is a use case that would be solved by #1527?

azaroth42 avatar May 27 '21 19:05 azaroth42

Yes, if I'm understanding #1527 correctly, it should meet the need. I can paste the use case outlined above into that issue if it makes sense to merge them together.

What's the general process for documenting an extension? In this case, the ,<!> syntax pattern extension for size would be used as suggested in the original issue. Implementation would be on our customized IIP server (future).

beaudet avatar May 28 '21 20:05 beaudet