Skip to content

Commit

Permalink
Merge pull request #1013 from girder/tiny-test-source
Browse files Browse the repository at this point in the history
Support tiny images from the test source.
  • Loading branch information
manthey authored Dec 15, 2022
2 parents e66bec8 + b33ed03 commit 5ed3a3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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
- Better release file handles ([#1007](../../pull/1007))
- Support tiny images from the test source ([#1011](../../pull/1011))

### Changes
- Don't report filename in internal PIL metadata ([#1006](../../pull/1006))
Expand Down
4 changes: 2 additions & 2 deletions sources/test/large_image_source_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def __init__(self, ignored_path=None, minLevel=0, maxLevel=9,
if not sizeX else sizeX)
self.sizeY = (((2 ** self.maxLevel) * self.tileHeight)
if not sizeY else sizeY)
self.maxLevel = int(math.ceil(math.log2(max(
self.sizeX / self.tileWidth, self.sizeY / self.tileHeight))))
self.maxLevel = max(0, int(math.ceil(math.log2(max(
self.sizeX / self.tileWidth, self.sizeY / self.tileHeight)))))
self.frameSpec = frames or None
self.monochrome = bool(monochrome)
self.bandSpec = bands or None
Expand Down

0 comments on commit 5ed3a3f

Please sign in to comment.