-
-
Notifications
You must be signed in to change notification settings - Fork 716
Description
When viewing iiif files created with:
vips dzsave in.jpg out --layout iiif --tile-size 512 --suffix ".jpg[Q=90]"
at smaller zoom levels OpenSeadragon sometimes requests edge tiles that don't exist. However, unlike issue #1621 the problem is not with the size of the tiles generated, but with the 'width' and 'height' values output to the associated 'info.json' file. They are sometimes too large by a pixel.
For example when converting this image:
https://upload.wikimedia.org/wikipedia/commons/d/d7/Giovanni_Bellini_-Saint_Francis_in_the_Desert-_Google_Art_Project.jpg
the original size is 30,000 × 26,319 pixels, but the dimensions output to the generated 'info.json' file are .
"width": 30000,
"height": 26320
When fully zoomed out the tiles along the bottom edge are missing:
After manually editing the 'info.json' file with the correct dimensions, the file renders perfectly:
This problem doesn't arise for all images. This file, for example, presented no problems:
https://upload.wikimedia.org/wikipedia/commons/5/50/Pieter_Bruegel_the_Elder_-The_Tower_of_Babel%28Vienna%29_-_Google_Art_Project.jpg
Its dimensions are 30,000 × 21,952 - both even numbers.
It would appear, therefore, that the issue may arise from a rounding error.
Thanks.
[vips-8.10.1 compiled on Linux 5.7.0-2-amd64]