IMHO all clients should only display thumbnails unless the image/file is OPENED.
In one application we need to store 1MB image files (in the fie system), but in the form we fetch, convert and just display a 15K thumbnail - fully automatic. remote users will love it.:D if not os.path.isfile (thumb_name) and os.path.isfile (pict_name) : try : im = Image.open (pict_name) im.thumbnail ((250,250)) im.save (thumb_name, "JPEG") except IOError: print "cannot create thumbnail for ", pict_name if os.path.isfile (thumb_name) : try : pic = base64.encodestring(file(thumb_name, 'rb').read()) except IOError: print "cannot open thumbnail ", thumb_name pic = "" else : pic = "" result[obj.id] = pic -------------------- m2f -------------------- -- http://www.openobject.com/forum/viewtopic.php?p=51350#51350 -------------------- m2f -------------------- _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman2/listinfo/tinyerp-users
