mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 21:24:31 +03:00
Merge pull request #1193 from karimbahgat/master
Keep user-specified ordering of icon sizes
This commit is contained in:
commit
026789f258
|
@ -48,7 +48,6 @@ def _save(im, fp, filename):
|
||||||
width, height = im.size
|
width, height = im.size
|
||||||
filter(lambda x: False if (x[0] > width or x[1] > height or
|
filter(lambda x: False if (x[0] > width or x[1] > height or
|
||||||
x[0] > 255 or x[1] > 255) else True, sizes)
|
x[0] > 255 or x[1] > 255) else True, sizes)
|
||||||
sizes = sorted(sizes, key=lambda x: x[0])
|
|
||||||
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
|
||||||
for size in sizes:
|
for size in sizes:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user