mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-09-24 13:07:00 +03:00
Simplified code
This commit is contained in:
parent
f5d866fce0
commit
fe21dfa881
|
@ -107,13 +107,10 @@ def _write_single_frame(im: Image.Image, fp: IO[bytes]) -> None:
|
||||||
fp.write(icon_data)
|
fp.write(icon_data)
|
||||||
fram_end = fp.tell()
|
fram_end = fp.tell()
|
||||||
|
|
||||||
fp.seek(icon_offset - 4)
|
for offset in (icon_offset, list_offset):
|
||||||
icon_size = fram_end - icon_offset
|
fp.seek(offset - 4)
|
||||||
fp.write(o32(icon_size))
|
size = fram_end - offset
|
||||||
|
fp.write(o32(size))
|
||||||
fp.seek(list_offset - 4)
|
|
||||||
list_size = fram_end - list_offset
|
|
||||||
fp.write(o32(list_size))
|
|
||||||
|
|
||||||
fp.seek(fram_end)
|
fp.seek(fram_end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user