IIIF / api

Source for API and model specifications documents (api and model)
http://iiif.io/api
106 stars 54 forks source link

Multiple images on one canvas (content state) #2209

Open higginsr opened 4 years ago

higginsr commented 4 years ago

It is possible to have more than one image painted on to part or all of a canvas, although there doesn't seem to be any particular control over which one appears on top until a choice is made within the browser. I assume normal browser behaviour is to display the first one listed on top. A simple example is https://iiif.durham.ac.uk/index.html?manifest=t1mz029p473h&canvas=t1t6395w7729 for which manifest extract is:

{ "@id": "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/mz/02/t1mz029p473h/canvas/t1t6395w7729", "@type": "sc:Canvas", "label": "f.143r", "width": 5700, "height": 6850, "images": [ { "@id": "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/mz/02/t1mz029p473h/annotation/canvas_t1t6395w7729", "@type": "oa:Annotation", "motivation": "sc:painting", "resource": { "@id": "https://iiif.durham.ac.uk/iiif/trifle/32150/t1/mz/02/t1mz029p473h/fb719bdeef9cb52869b1d0476e049827.jp2/full/full/0/default.jpg", "@type": "dctypes:Image", "format": "image/jpeg", "width": 5700, "height": 6850, "service": { "@context": "http://iiif.io/api/image/2/context.json", "@id": "https://iiif.durham.ac.uk/iiif/trifle/32150/t1/mz/02/t1mz029p473h/fb719bdeef9cb52869b1d0476e049827.jp2", "profile": "http://iiif.io/api/image/2/level1.json" } }, "on": "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/mz/02/t1mz029p473h/canvas/t1t6395w7729" }, { "@id": "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/mz/02/t1mz029p473h/annotation/canvas_t1t6395w7729_t2wp988j80f", "@type": "oa:Annotation", "motivation": "sc:painting", "label": "f.143r (image uncovered)", "resource": { "@id": "https://iiif.durham.ac.uk/iiif/trifle/32150/t1/mz/02/t1mz029p473h/10dc335395eb5243d0f9085098f4a58e.jp2/full/full/0/default.jpg", "@type": "dctypes:Image", "format": "image/jpeg", "width": 5700, "height": 6850, "service": { "@context": "http://iiif.io/api/image/2/context.json", "@id": "https://iiif.durham.ac.uk/iiif/trifle/32150/t1/mz/02/t1mz029p473h/10dc335395eb5243d0f9085098f4a58e.jp2", "profile": "http://iiif.io/api/image/2/level1.json" } }, "on": "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/mz/02/t1mz029p473h/canvas/t1t6395w7729#xywh=0,0,5700,6850" } ] },

It is not currently possible to display and annotate the "lower" (more interesting?) image using content state, nor to switch the annotation on and off depending on which image is being viewed. To allow for this in future we could have an optional parameter for the id of the image if it is not the first in the sequence in the manifest. An advantage of this would be that it doesn't need to hold up progress with content state. In most cases there will only be one image per canvas and no parameter need be supplied. If the parameter is present do the more complicated thing displaying the alternative image and any text annotation included should only be visible when that image has focus.

tomcrane commented 4 years ago

Related to https://github.com/IIIF/cookbook-recipes/issues/23 and https://github.com/IIIF/iiif-stories/issues/101

aisaac commented 4 years ago

Discusses in TSG call 10 June and 2 Sept

azaroth42 commented 1 year ago

Propose transfer to iiif/api

tomcrane commented 1 year ago

:+1: to transfer

kirschbombe commented 1 year ago

For the discussion on order of images/"which image appears on top", see the Implementation notes in this recipe: https://iiif.io/api/cookbook/recipe/0036-composition-from-multiple-images/ - just in case this question comes up re: content state