Skip to content

Commit

Permalink
Merge pull request #96 from plone/load-truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli authored Jun 13, 2024
2 parents 4191e75 + cf687e5 commit 5ef4f47
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 5ef4f47

Please sign in to comment.