Skip to content

Commit dcb324c

Browse files
committed
DeepZoomGenerator: Ensure get_tile_coordinates() returns tuples
1 parent 8d65894 commit dcb324c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

openslide/deepzoom.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,12 @@ def _get_tile_info(self, level, t_location):
160160
l_location = [self._l_from_z(level, z) - z_tl
161161
for z, z_tl in zip(z_location, z_overlap_tl)]
162162
# Round location down and size up
163-
l0_location = [int(self._l0_from_l(layer, l)) for l in l_location]
164-
l_size = [int(min(math.ceil(self._l_from_z(level, dz)),
163+
l0_location = tuple(int(self._l0_from_l(layer, l))
164+
for l in l_location)
165+
l_size = tuple(int(min(math.ceil(self._l_from_z(level, dz)),
165166
l_lim - math.ceil(l)))
166167
for l, dz, l_lim in
167-
zip(l_location, z_size, self._l_dimensions[layer])]
168+
zip(l_location, z_size, self._l_dimensions[layer]))
168169

169170
# Return read_region() parameters plus tile size for final scaling
170171
return ((l0_location, layer, l_size), z_size)

0 commit comments

Comments
 (0)