Changeset 1711
- Timestamp:
- 25 Apr 2007, 19:22:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r1710 r1711 26 26 27 27 import DateTime 28 #import PIL.Image28 import PIL.Image 29 29 from StringIO import StringIO 30 30 … … 646 646 picture ="%s/import/pictures/%s.jpg" % (i_home,jamb_reg_no) 647 647 app.manage_setLocalRoles(sid, ['Owner',]) 648 648 649 picture_id = da['jamb_reg_no'].replace('/','_') 649 650 file = None … … 654 655 break 655 656 if file is not None: 656 outfile = file.read() 657 img = PIL.Image.open(file) 658 img.thumbnail((150,200), 659 resample=PIL.Image.ANTIALIAS) 660 # We now need a buffer to write to. It can't be the same 661 # as the inbuffer as the PNG writer will write over itself. 662 outfile = StringIO() 663 img.save(outfile, format=img.format) 664 #outfile = file.read() 657 665 app_doc.manage_addFile('passport', 658 666 file=outfile,
Note: See TracChangeset for help on using the changeset viewer.