Skip to content

iiif tiling - incorrect image dimensions output to info.json file #1818

@Linden6

Description

@Linden6

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:
Grimshot 2020-09-16 17-57-32
After manually editing the 'info.json' file with the correct dimensions, the file renders perfectly:
Grimshot 2020-09-16 18-00-51
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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions