api icon indicating copy to clipboard operation
api copied to clipboard

IIIF Image API Selector rotation

Open stephenwf opened this issue 2 years ago • 0 comments

There is some ambiguity with the IIIF Image API Selector and how rotation relates to the annotation target.

When you have an annotation body like this:

{
  "type": "SpecificResource",
  "source": "https://example.org/iiif/image1",
  "selector": {
    "type": "ImageApiSelector",
    "rotation": "45"
  }
}

And a target:

{
  "target": "https://example.org/canvas1#xywh=0,100,200,300"
}

There are 2 ways that this could be interpreted.

  1. Paint the image at 0,100,200,300 and then rotate it by 45 degrees at it's origin
  2. Rotate the image and bound it to the region 0,100,200,300

I think option (2) is correct, as this is analagous to how it would work if you requested a 45degree full/full image from an image server. (e.g. https://iiif-stage-new.wellcomecollection.org/image/b2043067x_0001.jp2/full/400,/30/default.jpg)

image

This example shows how both the size of the target and the position changes depending on which option is correct.

Also there is the question of what to do when there is extra space, should the rotate image be stretched to fit inside the target, similar to a static image would be.

image

stephenwf avatar Apr 03 '23 12:04 stephenwf