Skip to content

--layout iiif coordinates off by a few pixels #2482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
martimpassos opened this issue Oct 14, 2021 · 4 comments
Closed

--layout iiif coordinates off by a few pixels #2482

martimpassos opened this issue Oct 14, 2021 · 4 comments

Comments

@martimpassos
Copy link

Hi, since the changes from IIIF v2.1 (currently supported by libvips) to 3.0 aren't too many, I wrote a script to transform the generated info.json and rename the tile size folders to the new canonical form. However, when trying to open the tiled image on a compliant viewer, it fails to load a portion of it on certain zoom levels.

I guess the problem could be either on how the tile coordinates or the peripheral tile sizes are calculated/padded. I checked that the folder I rename (/256,123/) matches the tile size inside and I don't touch the coordinate one. Here's an example:

Browser looks for: 001AAN005121/0,4096,4096,1962/256,123/0/default.jpg
File that actually is created:001AAN005121/0,4096,4096,1968/256,123/0/default.jpg

Zoomed out:
Screen Shot 2021-10-14 at 18 14 27

Zoomed in:
Screen Shot 2021-10-14 at 18 14 53

@martimpassos
Copy link
Author

Ok so apparently the problem was with just 4 files, the right and downmost tiles of the lower zoom level. Renaming them by hand fixed the problem, here's the complete list:

0,0,8192,6080 -> 0,0,8192,6058
8192,0,1056,6080 -> 8192,0,1036,6058
4096,4096,4096,1968 -> 4096,4096,4096,1962
0,4096,4096,1968 -> 0,4096,4096,1962

@martimpassos
Copy link
Author

sorry, this is a duplicate of #1621. I'll close it

@jcupitt
Copy link
Member

jcupitt commented Oct 15, 2021

That bug was fixed a while ago, were you using an old libvips?

@martimpassos
Copy link
Author

yes, 8.9.1. I'll build the latest version manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants