SmileyChris/easy-thumbnails — Issue #118:  IOError: image file is truncated (21 bytes not processed)
Author: vladimir-webdev
Created: 2012-02-24 12:22:15+00:00
State: open

Traceback:

File "/env/lib/python2.6/site-packages/easy_thumbnails/files.py", line 345, in get_thumbnail
thumbnail = self.generate_thumbnail(thumbnail_options)

File "/env/lib/python2.6/site-packages/easy_thumbnails/files.py", line 263, in generate_thumbnail
self.thumbnail_processors)

File "/env/lib/python2.6/site-packages/easy_thumbnails/engine.py", line 29, in process_image
image = processor(image, **processor_options)

File "/env/lib/python2.6/site-packages/easy_thumbnails/processors.py", line 157, in scale_and_crop
resample=Image.ANTIALIAS)

File "/env/lib/python2.6/site-packages/PIL/Image.py", line 1290, in resize
self.load()

File "/env/lib/python2.6/site-packages/PIL/ImageFile.py", line 201, in load
raise IOError("image file is truncated (%d bytes not processed)" % len(b))

I believe easy-thumbnails should catch this exception and raise InvalidImageFormatError instead.