mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
commit suggestion; update src/PIL/IcoImagePlugin.py
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
39f4738775
commit
4ca8a3507d
|
@ -64,9 +64,8 @@ def _save(im, fp, filename):
|
|||
fp.write(struct.pack("<H", 32)) # wBitCount(2)
|
||||
|
||||
image_io = BytesIO()
|
||||
if size in alt_images:
|
||||
tmp = alt_images[size]
|
||||
else:
|
||||
tmp = alt_images.get(size)
|
||||
if not tmp:
|
||||
# TODO: invent a more convenient method for proportional scalings
|
||||
tmp = im.copy()
|
||||
tmp.thumbnail(size, Image.LANCZOS, reducing_gap=None)
|
||||
|
|
Loading…
Reference in New Issue
Block a user