Fixed saving bug in __main__

This commit is contained in:
Andrew Murray 2020-02-17 22:11:24 +11:00
parent 29fee8fc43
commit bd7242228b

View File

@ -368,9 +368,7 @@ if __name__ == "__main__":
imf = IcnsImageFile(open(sys.argv[1], "rb")) imf = IcnsImageFile(open(sys.argv[1], "rb"))
for size in imf.info["sizes"]: for size in imf.info["sizes"]:
imf.size = size imf.size = size
imf.load() imf.save("out-%s-%s-%s.png" % size)
im = imf.im
im.save("out-%s-%s-%s.png" % size)
im = Image.open(sys.argv[1]) im = Image.open(sys.argv[1])
im.save("out.png") im.save("out.png")
if sys.platform == "windows": if sys.platform == "windows":