mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-27 04:23:40 +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)
|
vres = _res_to_dpi(vrcn, vrcd, vrce)
|
||||||
if hres is not None and vres is not None:
|
if hres is not None and vres is not None:
|
||||||
dpi = (hres, vres)
|
dpi = (hres, vres)
|
||||||
|
break
|
||||||
|
|
||||||
if size is None or mode is None:
|
if size is None or mode is None:
|
||||||
raise SyntaxError("Malformed JP2 header")
|
raise SyntaxError("Malformed JP2 header")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user