Skip to content

Commit

Permalink
Merge pull request #1269 from girder/harden-retile
Browse files Browse the repository at this point in the history
Harden internal retiling
  • Loading branch information
manthey authored Aug 18, 2023
2 parents 8e643b3 + c564bfb commit 52fd387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Improvements
- Harden when the bioformats reader claims it has a zero sized image ([#1268](../../pull/1268))
- Harden internal retiling. This sometimes affected histograms ([#1269](../../pull/1269))

### Changes
- Adjust tifffile log level ([#1265](../../pull/1265))
Expand Down
2 changes: 2 additions & 0 deletions large_image/tilesource/tiledict.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def _retileTile(self):
y0 = 0
tileData = tileData[:min(tileData.shape[0], self.height - y0),
:min(tileData.shape[1], self.width - x0)]
if tileData.shape[2] < retile.shape[2]:
retile = retile[:, :, :tileData.shape[2]]
retile[y0:y0 + tileData.shape[0], x0:x0 + tileData.shape[1]] = tileData[
:, :, :retile.shape[2]]
return retile
Expand Down

0 comments on commit 52fd387

Please sign in to comment.