Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
clarenceyapp committed Apr 25, 2022
2 parents 2d1963a + e9c9934 commit 77ab86b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions save_tifffile_pyramid.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def save_pyramid(

max_size = np.max(img_shape)
subifds = np.ceil(np.log2(max_size / 1024)).astype(int)
# skip pyramid if max image size <= 1024
if subifds < 0:
subifds = 0

# use optimal tile size for disk space
tile_size = 16*np.ceil(
Expand Down

0 comments on commit 77ab86b

Please sign in to comment.