Renamed variable to match IcnsImagePlugin

This commit is contained in:
Andrew Murray 2020-11-04 22:42:53 +11:00
parent a357ff12ad
commit 2ae597c357

View File

@ -52,7 +52,7 @@ def _save(im, fp, filename):
sizes = list(sizes) sizes = list(sizes)
fp.write(struct.pack("<H", len(sizes))) # idCount(2) fp.write(struct.pack("<H", len(sizes))) # idCount(2)
offset = fp.tell() + len(sizes) * 16 offset = fp.tell() + len(sizes) * 16
alt_images = {im.size: im for im in im.encoderinfo.get("append_images", [])} provided_images = {im.size: im for im in im.encoderinfo.get("append_images", [])}
for size in sizes: for size in sizes:
width, height = size width, height = size
# 0 means 256 # 0 means 256
@ -64,7 +64,7 @@ def _save(im, fp, filename):
fp.write(struct.pack("<H", 32)) # wBitCount(2) fp.write(struct.pack("<H", 32)) # wBitCount(2)
image_io = BytesIO() image_io = BytesIO()
tmp = alt_images.get(size) tmp = provided_images.get(size)
if not tmp: if not tmp:
# TODO: invent a more convenient method for proportional scalings # TODO: invent a more convenient method for proportional scalings
tmp = im.copy() tmp = im.copy()