We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7874e8 commit df99d48Copy full SHA for df99d48
1 file changed
src/PIL/PsdImagePlugin.py
@@ -185,14 +185,13 @@ def read(size):
185
# image info
186
mode = []
187
ct_types = i16(read(2))
188
- types = list(range(ct_types))
189
- if len(types) > 4:
190
- fp.seek(len(types) * 6 + 12, io.SEEK_CUR)
+ if ct_types > 4:
+ fp.seek(ct_types * 6 + 12, io.SEEK_CUR)
191
size = i32(read(4))
192
fp.seek(size, io.SEEK_CUR)
193
continue
194
195
- for _ in types:
+ for _ in range(ct_types):
196
type = i16(read(2))
197
198
if type == 65535:
0 commit comments