Changeset 974


Ignore:
Timestamp:
1 Dec 2006, 09:05:19 (18 years ago)
Author:
joachim
Message:

pil usage disabled
not tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r971 r974  
    432432            if os.path.exists(picture):
    433433                file = open(picture)
    434                 img = PIL.Image.open(file)
    435                 img.thumbnail((150,200),
    436                               resample=PIL.Image.ANTIALIAS)
    437                 # We now need a buffer to write to. It can't be the same
    438                 # as the inbuffer as the PNG writer will write over itself.
    439                 outfile = StringIO()
    440                 img.save(outfile, format=img.format)
     434                if False:
     435                    img = PIL.Image.open(file)
     436                    img.thumbnail((150,200),
     437                                  resample=PIL.Image.ANTIALIAS)
     438                    # We now need a buffer to write to. It can't be the same
     439                    # as the inbuffer as the PNG writer will write over itself.
     440                    outfile = StringIO()
     441                    img.save(outfile, format=img.format)
     442                else:
     443                    outfile = file.read()
    441444                app_doc.manage_addFile('passport',
    442445                                       file=outfile,
Note: See TracChangeset for help on using the changeset viewer.