diff --git a/src/PIL/IcoImagePlugin.py b/src/PIL/IcoImagePlugin.py index 11081e71d..40db16df2 100644 --- a/src/PIL/IcoImagePlugin.py +++ b/src/PIL/IcoImagePlugin.py @@ -56,7 +56,9 @@ def _save(im, fp, filename): fp.write(o16(len(sizes))) # idCount(2) offset = fp.tell() + len(sizes) * 16 bmp = im.encoderinfo.get("bitmap_format") == "bmp" - provided_images = {im.size: im for im in im.encoderinfo.get("append_images", [])} + provided_images = { + im.size: im for im in [im] + im.encoderinfo.get("append_images", []) + } for size in sizes: width, height = size # 0 means 256