Skip to content

Commit

Permalink
fixed non-pyramidal tifs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-amme committed Aug 2, 2024
1 parent 989b5e8 commit d5c87dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exact/util/slide_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ def read_region(self, location, level, size, frame=0):
raise OpenSlideError("Invalid level")
if ['fail' for s in size if s < 0]:
raise OpenSlideError("Size %s must be non-negative" % (size,))
# for non-pyramidal tiff files we can only read frame 0
if frame >= self.numberOfLayers:
frame = self.numberOfLayers - 1
# Any corner of the requested region may be outside the bounds of
# the image. Create a transparent tile of the correct size and
# paste the valid part of the region into the correct location.
Expand Down

0 comments on commit d5c87dd

Please sign in to comment.