Skip to content
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

Region rounding error between different scales #21

Open
petrsloup opened this issue Dec 1, 2015 · 5 comments
Open

Region rounding error between different scales #21

petrsloup opened this issue Dec 1, 2015 · 5 comments
Assignees

Comments

@petrsloup
Copy link
Member

When requesting 2 images with identical region but different scale, slightly different region is returned:

http://iiif.klokantech.com/demo.jp2/2048,0,2048,2048/pct:12.5/0/native.jpg
vs
http://iiif.klokantech.com/demo.jp2/2048,0,2048,2048/pct:25/0/native.jpg

(Notice the y in Copy on the right edge.)

The same can be observed here:
http://iiif.klokantech.com/demo.jp2/2048,0,2048,2048/pct:12.5/0/native.jpg
vs
http://iiif.klokantech.com/demo.jp2/3584,1024,512,512/pct:50/0/native.jpg

(The regions are different, but should be aligned on the right side.)

@klokan
Copy link
Member

klokan commented Dec 1, 2015

Can we review this and possibly implement a fix for https://github.com/klokan/iiifserver-build/ @MartinMikita?

@klokan
Copy link
Member

klokan commented Dec 1, 2015

I checked the OpenSeaDragon - it makes request like: http://demo.iiifhosting.com/iiif/1/6144,4096,1024,1024/256,/0/default.jpg
but it seems to be exactly the same...

@petrsloup
Copy link
Member Author

@petrsloup
Copy link
Member Author

The problem happens in both IiifViewer and OpenSeaDragon

The problem is much harder to see with the Mona Lisa dataset. I can actually see it only in OpenSeaDragon -- is it working ok in IiifViewer?

@MartinMikita
Copy link
Member

http://iiif.klokantech.com/demo.jp2/2048,0,2048,2048/256,/0/native.jpg
http://iiif.klokantech.com/demo.jp2/2052,0,2048,2048/256,/0/native.jpg
http://iiif.klokantech.com/demo.jp2/2056,0,2048,2048/256,/0/native.jpg

IIPServer is using round() to resize view port (region) for calculated resolution.

First and second image are same, after 8 pixels region is moved by 1 pixel (2048 / 256).

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

3 participants