mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +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
|
# header
|
||||||
assert self.fp is not None
|
assert self.fp is not None
|
||||||
|
|
||||||
s = self.fp.read(128)
|
s = self.fp.read(68)
|
||||||
if not _accept(s):
|
if not _accept(s):
|
||||||
msg = "not a PCX file"
|
msg = "not a PCX file"
|
||||||
raise SyntaxError(msg)
|
raise SyntaxError(msg)
|
||||||
|
@ -66,7 +66,7 @@ class PcxImageFile(ImageFile.ImageFile):
|
||||||
raise SyntaxError(msg)
|
raise SyntaxError(msg)
|
||||||
logger.debug("BBox: %s %s %s %s", *bbox)
|
logger.debug("BBox: %s %s %s %s", *bbox)
|
||||||
|
|
||||||
offset = self.fp.tell()
|
offset = self.fp.tell() + 60
|
||||||
|
|
||||||
# format
|
# format
|
||||||
version = s[1]
|
version = s[1]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user