When trying to create thumbnails from images using the Zope book example, I get an IOError. This occurs when the image I am trying to thumbnail is larger than about 200k. Smaller images work fine. The error occurs after the: image = Image.open(.....) statement. Any statement after that starting with image.xxxxxxxx will give the error. Exact syntax from zope is: Error Type: IOError Error Value: image file is truncated, 15 bytes left in buffer with the amount of bytes changing depending on the image size. Is this a PIL error or is something wrong with getting the object from Zope ( using getattr(objectID) ) Could it be the: original_file = StringIO(original_image.data) call and the StringIO object is faulty? Any ideas? d
irrational writes:
When trying to create thumbnails from images using the Zope book example, I get an IOError. This occurs when the image I am trying to thumbnail is larger than about 200k. Smaller images work fine. Maybe, an old bug:
For small images, "data" is a string. For larger images, it's a complex object. You need to call "str(data)" to obtain the content. Dieter
participants (2)
-
Dieter Maurer -
irrational