diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a7cad5e6..91c8cd2fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## Unreleased + +### Bug Fixes +- getBandInformation could fail on high bands in some cases + ## Version 1.8.0 ### Features diff --git a/large_image/tilesource/base.py b/large_image/tilesource/base.py index 81182a2b4..09bb84843 100644 --- a/large_image/tilesource/base.py +++ b/large_image/tilesource/base.py @@ -1344,7 +1344,7 @@ def getBandInformation(self, statistics=False, **kwargs): if not getattr(self, '_bandInfoNoStats', None): tile = self.getSingleTile()['tile'] bands = tile.shape[2] if len(tile.shape) > 2 else 1 - interp = bandInterp.get(bands, 3) + interp = bandInterp.get(bands, bandInterp[3]) bandInfo = [{'interpretation': interp[idx] if idx < len(interp) else 'unknown'} for idx in range(bands)] self._bandInfoNoStats = bandInfo