Skip to content

Commit

Permalink
Merge pull request #1032 from girder/multi-background-nonsquare
Browse files Browse the repository at this point in the history
Fix an issue with non-square tiles in the multi source
  • Loading branch information
manthey authored Jan 20, 2023
2 parents 018db86 + d0a7804 commit 4452fab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### Improvements
- Speed up rendering Girder item page metadata in some instances ([#1031](../../pull/1031))

### Bug Fixes
- Fix an issue with non-square tiles in the multi source ([#1032](../../pull/1032))

## 1.19.2

### Improvements
Expand Down
4 changes: 2 additions & 2 deletions sources/multi/large_image_source_multi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,15 +1024,15 @@ def getTile(self, x, y, z, pilImageAllowed=False, numpyAllowed=False, **kwargs):
if fill:
colors = self._info.get('backgroundColor')
if colors:
tile = numpy.full((self.tileWidth, self.tileHeight, len(colors)), colors)
tile = numpy.full((self.tileHeight, self.tileWidth, len(colors)), colors)
# Add each source to the tile
for sourceEntry in sourceList:
tile = self._addSourceToTile(tile, sourceEntry, corners, scale)
if tile is None:
# TODO number of channels?
colors = self._info.get('backgroundColor', [0])
if colors:
tile = numpy.full((self.tileWidth, self.tileHeight, len(colors)), colors)
tile = numpy.full((self.tileHeight, self.tileWidth, len(colors)), colors)
# We should always have a tile
return self._outputTile(tile, TILE_FORMAT_NUMPY, x, y, z,
pilImageAllowed, numpyAllowed, **kwargs)
Expand Down

0 comments on commit 4452fab

Please sign in to comment.