Re: Process UploadedFile with PIL on-the-fly

2010-12-02 Thread wayne
On Dec 2, 4:40 am, muzhig wrote: > Hi! I need to resize and make a stamp on uploaded images and only then > save a model. > I have a procedure, that processes incoming File: > > def processUploadedImage(file): >         img = Image.open(file) >         downsampleUploadedimage(img) >         stampU

Process UploadedFile with PIL on-the-fly

2010-12-02 Thread muzhig
Hi! I need to resize and make a stamp on uploaded images and only then save a model. I have a procedure, that processes incoming File: def processUploadedImage(file): img = Image.open(file) downsampleUploadedimage(img) stampUploadedImage(img) img.save(file, "JPEG")