Do not convert I;16 image when format is PNG

This commit is contained in:
Andrew Murray 2020-06-29 22:14:40 +10:00
parent 20282dd23c
commit e1ae9a50cb

View File

@ -71,7 +71,8 @@ class Viewer:
# 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: