iiif_stuff

Testing canvases of different sizes

There have been discussions on the IIIF slack regarding how canvases of different sizes should be shown in a 2 up view. This was originally a UV issue but has highlighted an inconsistency between Mirador and the UV and the IIIF specification doesn’t provide a solution.

St Andrew’s use case

The original use case from St Andrew’s is the following manifest which has 4 images and the 2nd and 3rd image should be shown side by side in 2 up view. Currently the UV respects the sizes of the images in each canvas so doesn’t scale the smaller canvas to match the larger manifest:

Mirador currently does what St Andrew’s want and scales the smaller canvas to match the larger canvas:

Uniform canvas heights

One way to solve this issue is to ensure both canvases have the same height. As shown in the Image and Canvas with Differing Dimensions recipe, if an image is placed on a canvas which has bigger dimensions than the image it should be scaled up. In the manifest below the second canvas has been enlarged so the height is the same on canvas 2 and 3. The size of the 3rd image is left unchanged and the viewer should scale it.

The UV currently doesn’t respect the canvas dimensions due to issue #778 but if it did it should sort out the lack of alignment:

Mirador looks like it respects the canvas coordinates although it maybe scaling the image as mentioned previously.

Variable height use case

One downside of the Mirador implementation is that it assumes the Manifest provider wants to scale the smaller canvas but this might not be appropriate. In the following manuscript example the 3rd image is much smaller than its facing page but it would still be valid to have the sequence as paged. This might also happen if there are pullouts or other unexpected page sizes in a book or manuscript.

In this case the UV shows the two images but doesn’t scale up the smaller image (note I was careful to match the dimensions of the 3rd canvas and 3rd image to avoid #778):

With Mirador it scales up the smaller canvas and doesn’t look correct for this use case:

This is a slightly contrived case as you can see the original image was the same size as the facing page. For manifest above I cutout the manuscript fragment and used a static image in the manifest.

Original Image