mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Do not down-convert if image is RGBA when showing.
The down-convert code would convert all RGB-based modes (P RGB RGBX RGBA CMYK YCbCr LAB HSV) to RGB; but png can handle it!
This commit is contained in:
parent
a2cb304f62
commit
74da5878c5
|
@ -69,7 +69,7 @@ class Viewer(object):
|
|||
# FIXME: auto-contrast if max() > 255?
|
||||
else:
|
||||
base = Image.getmodebase(image.mode)
|
||||
if base != image.mode and image.mode != "1":
|
||||
if base != image.mode and image.mode != "1" and image.mode != "RGBA":
|
||||
image = image.convert(base)
|
||||
|
||||
return self.show_image(image, **options)
|
||||
|
|
Loading…
Reference in New Issue
Block a user