2

Just starting out playing with OpenSeadragon (very good btw) and on creating a custom tile set am wondering what the advantages or disadvantages of creating tiles with an overlap?

I've tried using 0 and it seems ok, but I wonder if there are any clarity or performance advantages or having the tiles overlap (I think DeepZoom format uses 4 for example?)

Thanks for any guidance!

user1690146
  • 383
  • 3
  • 14

1 Answers1

2

The advantage is when using sub-pixeling and interpolation when the tiles are placed at non-integer values.

If they overlap a little (usually just a single pixel) they will camouflage the tiny gap that typically occur.

(right-click and select "view image" to see larger version)

example image
(from this question)

For performance one would tend to at least use width and height divisible by 4 (or 8 for 64-bit) as these are faster to copy in memory, and often a size of 2n (ie. 32, 64, 128 etc.). Also see mip-mapping for zooming.

Community
  • 1
  • 1
  • Thanks - do you know if this also helps OpenSeadragon. I imagine it would? – user1690146 Jun 03 '15 at 21:06
  • 1
    @user1690146 I have to admit I had my mind "game oriented" when seeing the question, but with that said, there is no reason why it shouldn't as the tiles for images would also run into the same problem with sub-pixeling at some stage in the browser. I also know from experience stitching image pieces together in canvas for example, that either this approach or reducing the offset by a pixel is necessary in most of these cases (only when everything is integer bound you may escape this little compromise). –  Jun 03 '15 at 21:11
  • Yes, the tile overlap is indeed to avoid seeing seams. Just a single pixel tile overlap should be fine. As for the best tile size, for a long time we used 256 squares, but I think now with faster networks, maybe it's time to bump up to 512. I don't know for sure if it matters whether it's a power of 2 (i.e. exactly 512). If so, and you want your max tile size to be 512, you'll need to specify a tile size of 510 (assuming a tile overlap of 1). This is because the tile overlap is added to your tile size, once for each side of the tile (except for edges of the entire image). – iangilman Jun 10 '15 at 21:06