mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-09 16:10:48 +03:00
lint
This commit is contained in:
parent
52b9b4310c
commit
39f4738775
|
@ -90,7 +90,7 @@ def test_only_save_append_images(tmp_path):
|
||||||
im = hopper()
|
im = hopper()
|
||||||
provided_im = Image.new("RGBA", (32, 32), (255, 0, 0, 255))
|
provided_im = Image.new("RGBA", (32, 32), (255, 0, 0, 255))
|
||||||
outfile = str(tmp_path / "temp_saved_multi_icon.ico")
|
outfile = str(tmp_path / "temp_saved_multi_icon.ico")
|
||||||
im.save(outfile, sizes = [(32, 32), (64, 64)], append_images = [provided_im])
|
im.save(outfile, sizes=[(32, 32), (64, 64)], append_images=[provided_im])
|
||||||
|
|
||||||
with Image.open(outfile) as reread:
|
with Image.open(outfile) as reread:
|
||||||
reread.size = (64, 64)
|
reread.size = (64, 64)
|
||||||
|
|
|
@ -52,9 +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 = {
|
alt_images = {im.size: im for im in im.encoderinfo.get("append_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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user