From 82f4a0d8f24ee3bc7d679f87d07ae5622afea482 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 16 Aug 2019 19:43:28 +1000 Subject: [PATCH] Changed WindowsViewer format to PNG --- src/PIL/Image.py | 14 +++++++------- src/PIL/ImageShow.py | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index be4755e5b..4576d6a17 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2110,15 +2110,15 @@ class Image(object): Displays this image. This method is mainly intended for debugging purposes. - On Unix platforms, this method saves the image to a temporary - PNG file, and calls the **display**, **eog** or **xv** - utility, depending on which one can be found. + The image is first saved to a temporary file. By default, it will be in + PNG format. - On macOS, this method saves the image to a temporary PNG file, and - opens it with the native Preview application. + On Unix, the image is then opened using the **display**, **eog** or + **xv** utility, depending on which one can be found. - On Windows, it saves the image to a temporary BMP file, and uses - the standard BMP display utility to show it (usually Paint). + On macOS, the image is opened with the native Preview application. + + On Windows, the image is opened with the standard PNG display utility. :param title: Optional title to use for the image window, where possible. diff --git a/src/PIL/ImageShow.py b/src/PIL/ImageShow.py index 13df7dfbe..ca622c525 100644 --- a/src/PIL/ImageShow.py +++ b/src/PIL/ImageShow.py @@ -105,7 +105,8 @@ class Viewer(object): if sys.platform == "win32": class WindowsViewer(Viewer): - format = "BMP" + format = "PNG" + options = {"compress_level": 1} def get_command(self, file, **options): return (