[reportlab-users] [PATCH] for demos/rlzope.py
Jerome Alet
reportlab-users@reportlab.com
Fri, 23 Aug 2002 14:30:47 +0200
Hi,
Please could someone (with CVS write access) modify line 62
of demos/rlzope.py to be :
image = PIL_Image.open(cStringIO.StringIO(str(logo.data)))
The original line doesn't have the str() call.
This corrects a problem which happens when images are >64Kb. When
dealing with such images or files, Zope stores them as a string
of text if length is <64Kb or a sort of linked list if length is >64Kb.
The str() method does the right thing in every case, else you have to
manually visit each node of the linked list to reconstruct the original
data. The original code could only deal with images which length was
less than 64Kb, this modification solves the problem.
Thanks to Juergen Plasser who reported the bug.
hth.
Jerome Alet