diff --git a/sources/tiff/large_image_source_tiff/__init__.py b/sources/tiff/large_image_source_tiff/__init__.py index c3b825659..71c516714 100644 --- a/sources/tiff/large_image_source_tiff/__init__.py +++ b/sources/tiff/large_image_source_tiff/__init__.py @@ -651,7 +651,7 @@ def getPreferredLevel(self, level): baselevel = level while self._tiffDirectories[level] is None and level < self.levels - 1: level += 1 - while level - baselevel > self._maxSkippedLevels: + while level - baselevel >= self._maxSkippedLevels: level -= self._maxSkippedLevels return level