Skip to content

Commit

Permalink
Merge pull request #129 from jonas-amme/NonPyramidalTiff
Browse files Browse the repository at this point in the history
fixed non-pyramidal tiffs
  • Loading branch information
jonas-amme authored Aug 2, 2024
2 parents a1faea2 + d5c87dd commit 524b176
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 524b176

Please sign in to comment.