Please help with logic of Seadragon deep zoom viewer.

  • 1
  • Question
  • Updated 8 years ago
Hello!

I am a bit lost with the logic of Java Script which shows the Seadragon image.

Particularly: how does it trerat missing tile files in "..._files" directory?

I have 9 zoom levels, so my sub-directories are: 0, 1, 2, ..., 8.
My tile size is 256x256.
My picture size is 65536 x 65536 (i.e. width/height is 256 x 256).

I don't want to create this huge picture at once, but to upload its parts to my web-site from time to time (I wrote a PHP script that given image and its x,y coordinates inside my 65536 x 65536 picture, it cuts this image into tiles and propagates through the image pyramid.

Currently I have only the first 256x256 square of the whole picture, so my "..._files" directory is like this:

_files/0: 0_0.png
_files/1: 0_0.png
...
_files/8: 0_0.png

each zoom level contains only one tile.

When I start the deep zoom (java script) viewer, I expect to see a large black square (with tiny subsquare at the top-left) which is my 256x256 image with very low resolution.

I.e. I expect it to start with the lowest resolution.

Why does it not do this? Why does it display my 256x256 sub-image of the whole 65536 x 65536 picture on the whole screen?

How does it treat missing .png files - does it just create black squares for them?

Maybe I need first to create all the 65536 x 65536 picture pyramid and fill it with black-color tiles?

Thanks in advance...
Photo of Leo

Leo

  • 11 Posts
  • 0 Reply Likes

Posted 10 years ago

  • 1
Photo of Aseem Kishore

Aseem Kishore, Former Employee

  • 702 Posts
  • 124 Reply Likes
Official Response
Hey Leo,

I don't have the full context and haven't read your detailed questions, but I heartily recommend reading this two-part primer by our excellent former intern, Daniel Gasienica, that explains the exact numbers and format behind Deep Zoom:

http://gasi.ch/blog/inside-deep-zoom-1/
http://gasi.ch/blog/inside-deep-zoom-2/

I have a feeling this primer -- particularly part 2 -- will answer all of your questions. ;)