Skip to content

Commit

Permalink
Set PIL.ImageFile.LOAD_TRUNCATED_IMAGES = True
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Jun 12, 2024
1 parent 4191e75 commit cf687e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/14.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set PIL.ImageFile.LOAD_TRUNCATED_IMAGES = True to try to load damaged images. @davisagli
3 changes: 3 additions & 0 deletions plone/scale/scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def none_as_int(the_int):
# details.
PIL.ImageFile.MAXBLOCK = 1000000

# Try to load images even if they're truncated or have a failing CRC.
PIL.ImageFile.LOAD_TRUNCATED_IMAGES = True

MAX_PIXELS = 8192 * 8192


Expand Down

0 comments on commit cf687e5

Please sign in to comment.