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

Behaviour of non-upscaling, confined image in IIIF v3 #600

Open
tomcrane opened this issue Aug 10, 2022 · 0 comments
Open

Behaviour of non-upscaling, confined image in IIIF v3 #600

tomcrane opened this issue Aug 10, 2022 · 0 comments

Comments

@tomcrane
Copy link

Consider a source image with pixel dimensions 300,300 and a IIIF v3 image service.

If the request is /full/^!400,400/.. then the server can only return an image if the max_scale config setting allows it. If set to 1.0 it will not allow this request.

400 Bad Request
Requests for scales in excess of 100% are not allowed.

If the request is /full/!400,400/.. (no upscaling instruction, just a confinement instruction), and max_scale is (say) 1.0, Cantaloupe returns:

400 Bad Request
Requests for scales in excess of 100% must prefix the scale path component with a ^ character.

However, I think Cantaloupe could return the image at its natural size (300,300) for this request,

The spec says:

!w,h
The extracted region is scaled so that the width and height of the returned image are not greater than w and h, while maintaining the aspect ratio. The returned image must be as large as possible but not larger than the extracted region, w or h, or server-imposed limits.

The spec allows some leeway for the server here. An example scenario is a page full of thumbnails confined to a particular size, where interrogating the info.json of each image service in advance would be too much for the client.

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

No branches or pull requests

1 participant