dlcs / protagonist

MIT License
7 stars 2 forks source link

Ensure images smaller than thumbnail policy don't break anything #32

Closed tomcrane closed 1 year ago

tomcrane commented 3 years ago

API consumers shouldn't have to worry if an image in their workflow is smaller than a configured thumbnail policy. DLCS should just handle this gracefully - not try to make the bigger images, or advertise them as available.

This affects Orchestrator, Thumbs, Engine...

tomcrane commented 3 years ago

This issue is bigger (ha!) than thumbnails.

Cultural heritage content tends to be large images that benefit from tiled deep zoom. DLCS assumes images are waaay bigger than thumbs and it's always worthwhile invoking a full image server.

it's always worthwhile invoking a full image server

This is not true in many scenarios.

Scenario: a born-digital archive. Yes it contains some large photographs, but it also contains little images, 16x16 icons, gifs and whatnot. The kind of stuff someone might have had on Windows 3.1 in 1992.

The DLCS shouldn't choke on these. It just needs more strategies for serving them. Including:

Crucially for interop and clients not worrying about special cases, all these images can still be IIIF image services. For example, that 16 x 16 gif:

{
  "@context": "http://iiif.io/api/image/3/context.json",
  "id": "https://example.org/image-service/",
  "type": "ImageService3",
  "protocol": "http://iiif.io/api/image",
  "profile": "level0",
  "width": 16,
  "height": 16,
  "extraFormats": [ "gif" ],
  "preferredFormats": [ "gif" ],
  "sizes" : [
    {"width" : 16, "height": 16}
  ]
}

This image service info.json is not offering anything other that the original gif at its original size - except for an implicit jpg version for clients that expect a JPG (OpenSeadragon unless modified). The DLCS can handle the JPG transformation if an unknowing client asks for that format as a default, but the info.json above is stating a preferred format of gif for this asset.

The above image service for a 16 x 16 gif should actually work in OpenSeadragon.

Scenario: UI that doesn't need images > 2000 px and tends to full screen (not a deep zoom environment) Yes you could tile the viewport, but you're going to request all the tiles for the viewport size anyway; it's not 1995 any more. This can still benefit from an image server (for responsive images) but not necessarily tiled deep zoom.

Further reading: