KLEIN Stéphane wrote at 2005-5-31 00:13 +0200:
... I've the same problem and now it's work with this tip : "context.REQUEST.image.seek(0)".
My xImageScale.py [external method] is :
def xImageScale(img_file, maxx, maxy): from PIL import Image from cStringIO import StringIO img_file.seek(0) im = Image.open(img_file) im.thumbnail((maxx, maxy), Image.ANTIALIAS) out_file_str = StringIO() im.save(out_file_str, im.format) out_file_str.seek(0) tmp=out_file_str.read() out_file_str.close() return tmp
You need to learn that you *MUST* provide a *FULL* problem description when you seek help. This includes "Error Type", "Error Value" and "Traceback" in case you get an exception, and otherwise a clear description what went wrong. -- Dieter