3

I'm trying to understand how OpenSeadragon decides upon tile dimensions within a pyramidal .tiff image in order to generate the first layer of tiles. I can't see the correlation between the various sizes defined in the info.json that OpenSeadragon requests (which uses the IIIF Image API), and the tile dimensions.

When I click inside the OpenSeadragon viewer, multiple image requests are sent in order to request high resolution tiles, but the dimensions vary dramatically from image to image, and between click locations within the viewer.

Is it possible to force OpenSeadragon to use the sizes defined in info.json? From what I can see, it isn't.

I've tried looking through the IFFF Image API docs, the OpenSeadragon docs, and the OpenSeadragon.js file, but it's rather hard to follow the flow of execution fully within that.

Here is what the relevant part of the info.json looks like:

"width": 6555,
  "height": 6995,
  "sizes": [
    {
      "width": 102,
      "height": 109
    },
    {
      "width": 205,
      "height": 219
    },
    {
      "width": 410,
      "height": 437
    },
    {
      "width": 819,
      "height": 874
    },
    {
      "width": 1639,
      "height": 1749
    },
    {
      "width": 3278,
      "height": 3498
    }
  ],
  "tiles": [
    {
      "width": 6555,
      "height": 1664,
      "scaleFactors": [
        1,
        2,
        4,
        8,
        16,
        32,
        64
      ]
    }
  ],
  "profile": [
    "http://iiif.io/api/image/2/level2.json",
    {
      "formats": [
        "tif",
        "jpg",
        "gif",
        "png"
      ],
      "maxArea": 400000000,
      "qualities": [
        "bitonal",
        "default",
        "gray",
        "color"
      ],
      "supports": [
        "sizeByW",
        "regionByPx",
        "sizeByWhListed",
        "cors",
        "regionSquare",
        "sizeByDistortedWh",
        "sizeAboveFull",
        "canonicalLinkHeader",
        "sizeByConfinedWh",
        "sizeByPct",
        "jsonldMediaType",
        "regionByPct",
        "sizeByH",
        "rotationArbitrary",
        "baseUriRedirect",
        "rotationBy90s",
        "profileLinkHeader",
        "sizeByForcedWh",
        "sizeByWh",
        "mirroring"
      ]
    }
  ]
}
gusauwerda
  • 31
  • 2
  • I know a lot about OpenSeadragon, but I don't know that much about IIIF, so I don't know how much help I can be. At any rate, OSD should be using the tiles as specified in the JSON file. This might include the stuff in "sizes" but also could include math being done on the stuff inside "tiles" (based on the scale factors). If you really want to get to the bottom of it, here's the code: https://github.com/openseadragon/openseadragon/blob/master/src/iiiftilesource.js Is there something you're trying to accomplish besides just understanding it? – iangilman Jul 09 '19 at 21:19
  • That linked file is quite helpful. I'm attempting to manually fill a cache with images, so I need a way to generate all the possible URLs associated with an image, down to the smallest tile size. – gusauwerda Jul 09 '19 at 23:26
  • Interesting... Yup, you'll definitely want to know which images to load! Glad I could be of help :) – iangilman Jul 10 '19 at 22:42

0 Answers0