From a1df5e349f4da2780716a965fe1e5a4befabdc32 Mon Sep 17 00:00:00 2001 From: Andy Foster Date: Wed, 24 Apr 2024 15:26:20 -0400 Subject: [PATCH] Add partial IIIF 2.1 compliance Now support `max` size parameter, but keeps it backwards compatible with `full`. --- loris/webapp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loris/webapp.py b/loris/webapp.py index 264057d1..89fe4fe5 100755 --- a/loris/webapp.py +++ b/loris/webapp.py @@ -479,7 +479,10 @@ def route(self, request): return BadRequestResponse('"%s" is not a supported format' % (fmt,)) quality = params['quality'] rotation = params['rotation'] - size = params['size'] + if params['size'] == 'max': + size = 'full' + else: + size = params['size'] region = params['region'] return self.get_img(request, ident, region, size, rotation, quality, fmt, base_uri)