Skip to content

Commit

Permalink
fix: round up tile dimensions when dividing by 2
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Apr 3, 2024
1 parent 92a1687 commit a472576
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions large_image/tilesource/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def downsampleTileHalfRes(
resample_method: ResampleMethod,
) -> np.ndarray:
new_shape = {
'height': int(tile.shape[0] / 2),
'width': int(tile.shape[1] / 2),
'height': (tile.shape[0] + 1) // 2,
'width': (tile.shape[1] + 1) // 2,
'bands': 1,
}
if len(tile.shape) > 2:
Expand Down

0 comments on commit a472576

Please sign in to comment.