LOAD_TRUNCATED_IMAGES may allow PNG images to open

This commit is contained in:
Andrew Murray 2023-01-03 14:09:45 +11:00
parent f5c47ebe12
commit ea9a1b84aa

View File

@ -75,6 +75,10 @@ _plugins = [
class UnidentifiedImageError(OSError):
"""
Raised in :py:meth:`PIL.Image.open` if an image cannot be opened and identified.
If a PNG image raises this error, setting :data:`.ImageFile.LOAD_TRUNCATED_IMAGES`
to true may allow the image to be opened after all. The setting will ignore missing
data and checksum failures.
"""
pass