mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Revert "Added IGNORE_DECODING_ERRORS flag to ImageFile allowing corrupted images to load"
This reverts commit 156a443cdf
.
This commit is contained in:
parent
50e3e1185a
commit
f6da8c24dc
|
@ -37,7 +37,6 @@ MAXBLOCK = 65536
|
|||
SAFEBLOCK = 1024*1024
|
||||
|
||||
LOAD_TRUNCATED_IMAGES = False
|
||||
IGNORE_DECODING_ERRORS = False
|
||||
|
||||
ERRORS = {
|
||||
-1: "image buffer overrun error",
|
||||
|
@ -229,7 +228,7 @@ class ImageFile(Image.Image):
|
|||
|
||||
self.fp = None # might be shared
|
||||
|
||||
if not IGNORE_DECODING_ERRORS and (not LOAD_TRUNCATED_IMAGES or t == 0) and not self.map and e < 0:
|
||||
if (not LOAD_TRUNCATED_IMAGES or t == 0) and not self.map and e < 0:
|
||||
# still raised if decoder fails to return anything
|
||||
raise_ioerror(e)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user