mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-26 00:30:33 +03:00
Do not down-convert if image is LA when showing with PNG format
This commit is contained in:
parent
a986fed5b4
commit
848a629784
|
@ -71,7 +71,9 @@ class Viewer(object):
|
|||
# FIXME: auto-contrast if max() > 255?
|
||||
else:
|
||||
base = Image.getmodebase(image.mode)
|
||||
if base != image.mode and image.mode != "1" and image.mode != "RGBA":
|
||||
if not (base == image.mode or
|
||||
image.mode in ("1", "RGBA") or
|
||||
(self.format == "PNG" and image.mode == "LA")):
|
||||
image = image.convert(base)
|
||||
|
||||
return self.show_image(image, **options)
|
||||
|
|
Loading…
Reference in New Issue
Block a user