Skip to content

Commit b1635bb

Browse files
committed
openslide.deepzoom: Fix longstanding overlap calculation bug
We were subtracting the top-left overlap in the wrong coordinate plane. This only mattered for formats with perfect tile alignment and without exact power-of-two downsamples, so was probably only relevant for Aperio.
1 parent 6624c19 commit b1635bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openslide/deepzoom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def _get_tile_info(self, dz_level, t_location):
158158

159159
# Obtain the region coordinates
160160
z_location = [self._z_from_t(t) for t in t_location]
161-
l_location = [self._l_from_z(dz_level, z) - z_tl
161+
l_location = [self._l_from_z(dz_level, z - z_tl)
162162
for z, z_tl in zip(z_location, z_overlap_tl)]
163163
# Round location down and size up
164164
l0_location = tuple(int(self._l0_from_l(slide_level, l))

0 commit comments

Comments
 (0)