api icon indicating copy to clipboard operation
api copied to clipboard

Multiple images on one canvas (content state)

Open higginsr opened this issue 4 years ago • 5 comments

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.

higginsr avatar Apr 29 '20 16:04 higginsr

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

tomcrane avatar May 13 '20 17:05 tomcrane

Discusses in TSG call 10 June and 2 Sept

aisaac avatar Sep 02 '20 17:09 aisaac

Propose transfer to iiif/api

azaroth42 avatar Oct 12 '22 16:10 azaroth42

:+1: to transfer

tomcrane avatar Oct 13 '22 09:10 tomcrane

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

kirschbombe avatar Feb 01 '23 22:02 kirschbombe