Skip to content

Commit

Permalink
LOAD_TRUNCATED_IMAGES may allow PNG images to open
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jan 3, 2023
1 parent f5c47eb commit ea9a1b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PIL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
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

0 comments on commit ea9a1b8

Please sign in to comment.