Closed filak closed 2 years ago
It looks to me like a bug in Openseadragon.
Your image is 2609x3424 pixels in size and the region requested by http://iip.test/iiif/f.jp2/2048,0,561,2048/71,/0/default.jpg is for a region of 561 pixels in width. It's using a "tile" width of 2048 for the first IIIF request (left tile on the full-size image) and if we calculate the size of this right tile, we get 2609-2048 = 561, which is indeed what it asks for, so this part is correct.
If we now look at the size parameter of the IIIF request, for the left tile it asks for a tile of size 256 in width, so it's asking for a resolution 1/8 of the size of the original image. Indeed info.json advertises tiles with size 256x256 at scale factors of 1,2,4,8,16, so asking for a scale factor of 8 is good. But, 561/8 = 70.125 not 71. For some reason, Openseadragon is rounding up rather than to the nearest integer. If you change your IIIF request slightly and replace 71 with 70, it works as it should and you get the correct height of 172 pixels. This works similarly with the second row of tiles.
Even if Openseadragon is using the sizes list in the info.json, rather than calculating using the full size, it's still wrong, as this 1/8 resolution is advertised as having size:
{
"width": 326,
"height": 428
},
So, the size of the 2nd tile in the top row should be 326-256 = 70
Thank you for the analysis, I will create an issue at the OSD repo.
I have this image:
When used with Openseadragon viewer I get these IIIF API calls:
First row:
Second row:
The content of the last tile column appears dropped a bit when zoomig out or on a small displays.