Closed edsu closed 9 years ago
Can you share the raw image and then I can check with the image and OpenSeadragon alone?
Sure it's up on Github too:
Hmmm... there do seem to be problems with the right-edge tiles when I run with just OSD : http://resync.library.cornell.edu/iiif/demo-static/001.html . Can see by loading, clicking (+) once, and see there aren't the zoomed tiles for right-hand edge.
The problem is that I'm trying to recreate the client's tile calculation algorithm (including rounding). Need too look at the mismatches in detail...
I happened to notice that mirador (master) builds with openseadragon v1.1.1
https://github.com/IIIF/mirador/blob/master/js/lib/openseadragon.min.js
Is that the version of OpenSeadragon that you tested with @zimeon? I updated my demo to use the latest openseadragon (v2.0.0) and it seems to load the missing tiles, but in a blurred state.
@edsu - thanks for the patch. Has this continued to work well for you?
I was using OSD 2.0.0 for testing. My inclination is to merge your patch, develop some tests for the sizes it generates and then rework to do the same using integer math (kind of an aesthetic thing for me to avoid floats unless necessary).
Yes, thanks @zimeon. It has been working well. I've generated tiles for about 4000 images so far, and they seem to be working fine w/ the latest Mirador, which is currently bundled with OpenSeadragon v1.1.1. Here are some examples if you want to see them:
If you want I can update it to OpenSeadragon v2 to see how it works? I like the idea for having some tests for this stuff, since visual spot checking isn't really scalable.
Have run test with current code (42a146c51781372735fc58c0c6ca14947c8e9827) on the 001.jpg image that had problems with before, using OSD v2.0.0-0-472ab42. The logs show show no 404's in tile requests implying that all the tiles OSD is looking for are present.
Details in https://gist.github.com/zimeon/d97bc554ead393b7588d
Nice!
Integer math version of int(math.ceil(rw/float(sf)))
is (rw+sf-1)/sf
, sanity check with:
simeon@Cider iiif>more a.py
import math
correct = 0
wrong = 0
for sf in range(1,4000):
for rw in range(1,4000):
sw_float = int(math.ceil(rw/float(sf)))
sw_int = (rw+sf-1)/sf
if (sw_float==sw_int):
correct += 1
else:
wrong += 1
print "sf=%d rw=%d sw_float=%d sw_int=%d" % (sf,rw,sw_float,sw_int)
print "Got %d correct, %d wrong" % (correct,wrong)
simeon@Cider iiif>python a.py
Got 15992001 correct, 0 wrong
Have redone test in https://gist.github.com/zimeon/d97bc554ead393b7588d with the integer math version and still seems fine. Concluding that tile sizes are good (until evidence to the contrary...). Ready for 0.6 release
Let me know if you want me to test, once it's merged in.
I started this in a discussion over on iiif discussion list but perhaps it's easier to track here.
I generated tiles for a 5117 x 3467 JPG using your v0.6.0 branch:
Which seemed to work fine. Then I put together a minimal manifest that references the tiles, and pushed it all up to GitHub, with the latest build of mirador (master):
https://edsu.github.io/mirador-test/
It almost seems to work, but Mirador appears to be requesting tile sizes that are slightly different than what are available. For example I can see in the console that Mirador is requesting these URLs that 404:
Did I configure the service incorrectly? Or perhaps there’s a mismatch between Mirador and iiif_static.py regarding tile sizes?