From 2bb912fd581b382212193e5e6b9e2d304fd8e380 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Mon, 11 Mar 2024 12:36:23 -0400 Subject: [PATCH] Fix a single band compositing issue --- CHANGELOG.md | 5 +++++ sources/multi/large_image_source_multi/__init__.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a5b030b8..418f508bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 1.27.5 + +### Bug Fixes +- Fix an issue with single band on multi source with non uniform sources ([#1474](../../pull/1474)) + ## 1.27.4 ### Improvements diff --git a/sources/multi/large_image_source_multi/__init__.py b/sources/multi/large_image_source_multi/__init__.py index 87d30d0ed..a14674052 100644 --- a/sources/multi/large_image_source_multi/__init__.py +++ b/sources/multi/large_image_source_multi/__init__.py @@ -1210,7 +1210,7 @@ def getTile(self, x, y, z, pilImageAllowed=False, numpyAllowed=False, **kwargs): colors, dtype=getattr(self, '_firstdtype', np.uint8)) if self._info.get('singleBand'): - tile = tile[:, :, 0] + tile = tile[:, :, :1] elif tile.shape[2] in {2, 4} and (self._bandCount or tile.shape[2]) < tile.shape[2]: # remove a needless alpha channel if np.all(tile[:, :, -1] == fullAlphaValue(tile)):