diff --git a/PIL/IcoImagePlugin.py b/PIL/IcoImagePlugin.py index 5dbf31f9f..195bbe42e 100644 --- a/PIL/IcoImagePlugin.py +++ b/PIL/IcoImagePlugin.py @@ -46,8 +46,9 @@ def _save(im, fp, filename): [(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)]) width, height = im.size - filter(lambda x: False if (x[0] > width or x[1] > height or - x[0] > 256 or x[1] > 256) else True, sizes) + sizes = filter(lambda x: False if (x[0] > width or x[1] > height or + x[0] > 256 or x[1] > 256) else True, + sizes) fp.write(struct.pack("