From d1be4229aa7078457e23ab549b45e028a2ddd051 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 15 Jan 2021 08:03:00 -0500 Subject: [PATCH] Fix an issue when a tile wasn't in an expected mode. --- CHANGELOG.md | 2 +- large_image/tilesource/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96e027a7a..e6c319637 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - Better handling of tiff files with JPEG compression and RGB colorspace (#503) ### Bug Fixes -- Harden updates of the item view after making a large image +- Harden updates of the item view after making a large image (#508) ## Version 1.3.2 diff --git a/large_image/tilesource/base.py b/large_image/tilesource/base.py index 3dda88ff7..3563bd17d 100644 --- a/large_image/tilesource/base.py +++ b/large_image/tilesource/base.py @@ -132,7 +132,7 @@ def _imageToNumpy(image): if not isinstance(image, PIL.Image.Image): image = PIL.Image.open(BytesIO(image)) if image.mode not in ('L', 'LA', 'RGB', 'RGBA'): - image.convert('RGBA') + image = image.convert('RGBA') mode = image.mode image = numpy.asarray(image) else: