diff --git a/news/14.bugfix b/news/14.bugfix new file mode 100644 index 0000000..09ad50c --- /dev/null +++ b/news/14.bugfix @@ -0,0 +1 @@ +Set PIL.ImageFile.LOAD_TRUNCATED_IMAGES = True to try to load damaged images. @davisagli diff --git a/plone/scale/scale.py b/plone/scale/scale.py index c3f7624..e84e998 100644 --- a/plone/scale/scale.py +++ b/plone/scale/scale.py @@ -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