We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11f0ed4 commit da45e3fCopy full SHA for da45e3f
src/psup_stac_converter/utils/file_utils.py
@@ -151,12 +151,13 @@ def convert_arr_to_thumbnail(
151
result = cm(result)[..., :4] # includes alpha
152
result = (result * 255).astype(np.uint8)
153
if mode == "RGB":
154
- result = result[..., :3][0]
+ result = result[..., :3]
155
else:
156
157
if mode in ["RGB", "RGBA"]:
158
result = np.stack([result] * (3 if mode == "RGB" else 4), axis=-1)
159
160
+ result = np.squeeze(result)
161
img = Image.fromarray(result, mode=mode)
162
img = img.resize(resize_dims, Image.Resampling.LANCZOS)
163
0 commit comments