From e1ae9a50cb002f5d5613c359d5e008ba5485d9d4 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 29 Jun 2020 22:14:40 +1000 Subject: [PATCH] Do not convert I;16 image when format is PNG --- src/PIL/ImageShow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PIL/ImageShow.py b/src/PIL/ImageShow.py index 57b7dcac7f6..3ffb4d63254 100644 --- a/src/PIL/ImageShow.py +++ b/src/PIL/ImageShow.py @@ -71,7 +71,8 @@ def show(self, image, **options): # save temporary image to disk if not ( - image.mode in ("1", "RGBA") or (self.format == "PNG" and image.mode == "LA") + image.mode in ("1", "RGBA") + or (self.format == "PNG" and image.mode in ("I;16", "LA")) ): base = Image.getmodebase(image.mode) if image.mode != base: