mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-16 06:36:49 +03:00
Simplified code
This commit is contained in:
parent
d7874e8a03
commit
df99d48a0c
|
@ -185,14 +185,13 @@ def _layerinfo(fp, ct_bytes):
|
||||||
# image info
|
# image info
|
||||||
mode = []
|
mode = []
|
||||||
ct_types = i16(read(2))
|
ct_types = i16(read(2))
|
||||||
types = list(range(ct_types))
|
if ct_types > 4:
|
||||||
if len(types) > 4:
|
fp.seek(ct_types * 6 + 12, io.SEEK_CUR)
|
||||||
fp.seek(len(types) * 6 + 12, io.SEEK_CUR)
|
|
||||||
size = i32(read(4))
|
size = i32(read(4))
|
||||||
fp.seek(size, io.SEEK_CUR)
|
fp.seek(size, io.SEEK_CUR)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for _ in types:
|
for _ in range(ct_types):
|
||||||
type = i16(read(2))
|
type = i16(read(2))
|
||||||
|
|
||||||
if type == 65535:
|
if type == 65535:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user