Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark when we know a tiff file is inefficient. #626

Merged
merged 1 commit into from
Aug 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sources/tiff/large_image_source_tiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ def _initWithTiffTools(self): # noqa
missing = [v is None for v in self._tiffDirectories]
maxMissing = max(0 if not v else missing.index(False, idx) - idx
for idx, v in enumerate(missing))
self._skippedLevels = maxMissing
if maxMissing >= self._maxSkippedLevels:
config.getConfig('logger').warning(
'Tiff image is missing many lower resolution levels (%d). '
'It will be inefficient to read lower resolution tiles.', maxMissing)
self._inefficientWarning = True
return True

def _reorient_numpy_image(self, image, orientation):
Expand Down