From bd7242228bda03e2b419a2e707c97159ac828b5c Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 17 Feb 2020 22:11:24 +1100 Subject: [PATCH] Fixed saving bug in __main__ --- src/PIL/IcnsImagePlugin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/PIL/IcnsImagePlugin.py b/src/PIL/IcnsImagePlugin.py index 18e8403d1..0e1b20596 100644 --- a/src/PIL/IcnsImagePlugin.py +++ b/src/PIL/IcnsImagePlugin.py @@ -368,9 +368,7 @@ if __name__ == "__main__": imf = IcnsImageFile(open(sys.argv[1], "rb")) for size in imf.info["sizes"]: imf.size = size - imf.load() - im = imf.im - im.save("out-%s-%s-%s.png" % size) + imf.save("out-%s-%s-%s.png" % size) im = Image.open(sys.argv[1]) im.save("out.png") if sys.platform == "windows":