Passing maxWidth to the processor #152
Replies: 6 comments
-
You mean to limit the maximum width of an image the client can request? There is not currently an option for that, though I can see a case for it. It could also be done by a |
Beta Was this translation helpful? Give feedback.
-
Hi, I was referring to the maxWidth option of the processor itself, which now that I'm looking closer at it would only set that limit within the info.json file, but it doesn't seem like that would reject any request to a size larger than that. I'm thinking of a set up that's similar to the way you would do authentication, where there's viewer-request function that could check a database to see if there's any size limits for an image, and restrict any requests over that size, but then you would still need a way to pass it to the processor to include it in the info.json (though, I suppose you could could insert into the info.json via a viewer response function). I think I get all that in concept, but I admit I don't understand iiif enough to know how to decode when a request would be greater than a size limit in the case of tiles. For instance, if you have a 2000px width limit, I think I get how one could reject any full size image greater than that, but not in the case of requesting individual tiles that would add up to something larger than 2000px. Our use case is that we have specific student work that we don't want to the public have high res access to. I think the surefire way is these cases is just to create lower res pyramid tiff derivatives. But it would be nice if authenticated users could get the high res stuff and non-authenticated would get lower res for specific items in our collection. |
Beta Was this translation helpful? Give feedback.
-
I think I understand. Just to clarify: You'd like As for the “total tile resolution” issue, the math is pretty easy. Let's say you have an image that's 10000 pixels wide, and the maximum resolution the current user is allowed to request is 2000 pixels wide. The user requests
This involves a little more parsing and math if either the crop or size parameters is expressed as a |
Beta Was this translation helpful? Give feedback.
-
Yes, I think we're on the same page here. I'm really not sure what the best way to handle the larger requests, whether to reject or just scale down. It seems like canteloupe just returns a sized down image. That seems probably fine. I think there's also the issue when iiif 'max' parameter is used—it would need to size down there too. Then, I wonder how this would play nice with an image viewer like openseadragon or mirador. I assume if there's a max width listed in the info.json it's just not going to make those requests for larger images in the first place? |
Beta Was this translation helpful? Give feedback.
-
@fitnycdigitalinitiatives The latest release of |
Beta Was this translation helpful? Give feedback.
-
Cool—I'lll take a look! |
Beta Was this translation helpful? Give feedback.
-
Is there a way to pass a maxWidth to the iiif-processor from this application?
Thanks,
Joseph
Beta Was this translation helpful? Give feedback.
All reactions