mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Stop reading from "res " after all information is extracted
This commit is contained in:
parent
ae54838146
commit
3ee5a9b094
|
@ -216,6 +216,7 @@ def _parse_jp2_header(fp):
|
|||
vres = _res_to_dpi(vrcn, vrcd, vrce)
|
||||
if hres is not None and vres is not None:
|
||||
dpi = (hres, vres)
|
||||
break
|
||||
|
||||
if size is None or mode is None:
|
||||
raise SyntaxError("Malformed JP2 header")
|
||||
|
|
Loading…
Reference in New Issue
Block a user