Questions about tile-serving

Benjamin Gilbert bgilbert at
Wed Sep 2 13:52:30 EDT 2015

Hi Martin,

On 09/02/2015 08:06 AM, Priv.-Doz. Dr. M. Weihrauch wrote:
> - If I am not mistaken, I would now have a look in OpenSlide, if that
> specific zoom level according to the dimensions exists in the original
> image, i. e. one of the levels of the original image has also
> approximately 16,321 pixels in width.

It's best to match OpenSlide levels with Deep Zoom levels using 
downsample values rather than level dimensions.  The OpenSlide level 
downsample isn't necessarily exactly the ratio of the level size to the 
size of level 0, if OpenSlide knows that the level sizes are subject to 
rounding or other errors.

> If yes, I extract my e. g. 256x256
> directly. If not, then I take the next bigger zoom level, extract
> 512x512 and resize to 256x256?

Take the next larger zoom level, extract a tile 256 * (downsample of 
Deep Zoom level / downsample of OpenSlide level) on a side, resize to 

> - Are the zoom levels for most openslide images dividing by 2 and 4 for
> the next zoom level or are there some other exotic formats?

Most formats do have zoom levels at powers of 2 or 4, but arbitrary 
downsamples are supported and will sometimes occur.

> 2. If the deepzoom overlap is 1, does that mean that I have to add 1
> pixel on the right and on the bottom border of the tile or 1 pixel to
> each side (given that this is not a tile from the image border)?

One pixel on each side, except at the image borders.

--Benjamin Gilbert

More information about the openslide-users mailing list