mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 00:02:24 +03:00
Reduced number of bytes read for header
This commit is contained in:
parent
313969cf0b
commit
7341e70f6b
|
@ -54,7 +54,7 @@ class PcxImageFile(ImageFile.ImageFile):
|
|||
# header
|
||||
assert self.fp is not None
|
||||
|
||||
s = self.fp.read(128)
|
||||
s = self.fp.read(68)
|
||||
if not _accept(s):
|
||||
msg = "not a PCX file"
|
||||
raise SyntaxError(msg)
|
||||
|
@ -66,7 +66,7 @@ class PcxImageFile(ImageFile.ImageFile):
|
|||
raise SyntaxError(msg)
|
||||
logger.debug("BBox: %s %s %s %s", *bbox)
|
||||
|
||||
offset = self.fp.tell()
|
||||
offset = self.fp.tell() + 60
|
||||
|
||||
# format
|
||||
version = s[1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user