A collection is made up of multiple images. Deep Zoom optimizes working with a collection of images by enabling lower levels of multiple images to share tiles which, reduces network traffic and render hundreds of high-resolution images at once. The collection optimization in Deep Zoom takes advantage of the fact that many times a user will want to display related content and then zoom in on one particular detail. With collections, thumbnails of images are stored on a shared tile (of 256x256 pixels).
For example, Deep Zoom can load and decode only one tile, and retrieve the thumbnails for a hundred images in one operation.
The following illustration shows how thumbnails are stored at various levels of detail.
.png)
Toward the top of the pyramid, all the images are packed into a single tile. In the middle of the pyramid, images share tiles, but multiple tiles may be needed to contain all the images. At the bottom of the pyramid, there is usually one image per tile.
The Deep Zoom collection is stored in image pyramids much like single images are, including how the tiles are named and numbered. Level numbers for collections refer to the size of each image in the tiles, not the total size of all the images. For instance, at level 2, there is a 4x4 pixel version of each image.
Images are stored in shared levels to make access to related images (which frequently share tiles) much faster and require fewer server roundtrips and less image decoding. Imagine a scenario where all the images on screen are fairly small – it will only require downloading a small number of tiles to get the images required for display.
Note that the items in a collection are stored and laid out spatially in a fashion that scales down nicely from one level to the next. Deep Zoom collections store layout information for individual items in a collection only once for each item. The layout used is called "Morton Layout." The nth item is stored in a location found by separating out the even and odd bits of n, then using those to find a row and column. For instance, the 5th image is 510=1012 which is split into 112=310 and 02=010. So it is stored in the 0th row and 3rd column of the collection.
For example, when building a collection, items are laid out (in chronological order) as follows:
0 1 4 5 16 17
2 3 6 7 18 19
8 9 12 13 ...
10 11 14 15
You can see how this is really a fractal layout and can grow to infinity.
Note that the preceding picture shows only three levels of tiles. However, a collection contains level 0 up to the maximum level chosen for the collection. The tile size must be greater than or equal to 2maxlevel.