Skip to content

Consider revisions to IIIF Image spec to disallow calculated size of zero pixels #2013

@beaudet

Description

@beaudet

Please see ProjectMirador/mirador2#3 which describes a specific use case / Mirador bug that led to a custom IIP patch to prevent a 400 error response when the computed size of an image by IIP ends up being zero. I submit that it's better to apply a minimum bound of 1 pixel to such calculations. To summarize: if the original request of an image with w:h aspect ratio of 2 is requested with a one dimension size constraint of "1," then the calculated height rounds to zero. That isn't a valid image size, yet returning an image that's 1x1 pixel in such cases seems perfectly reasonable as the aspect ratio of images resized to small integers can be substantially different from the original aspect ratio anyway. Returning a 400 error in response to a valid client size request seems to just complicate client logic. It would be better in my opinion to tweak the language in the spec to say the server "shall" apply a minimum bound of 1 pixel to calculated image sizes rather than returning a 400 bad request error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions