Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Eric Abrahamsen
On Jan 5, 2009, at 7:47 PM, Donn wrote: > > On Monday, 05 January 2009 00:51:03 Donn wrote: >> I am stuck on the interface between a PIL Image and a >> FilesystemStorage 'content' object. >> >> I can: img = Image.open(content) >> But how do I pass 'img' back to Django for saving? > > I have some

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Donn
On Monday, 05 January 2009 14:00:16 Eric Abrahamsen wrote: > content.write(o.getvalue()) > super(CustomImageStorage,self).save(name, content) That gives: 'InMemoryUploadedFile' object has no attribute '_mode' Exception Location: /usr/lib/python2.5/site-packages/django/core/files/base.py in

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Donn
On Monday, 05 January 2009 00:51:03 Donn wrote: > I am stuck on the interface between a PIL Image and a > FilesystemStorage 'content' object. > > I can: img = Image.open(content) > But how do I pass 'img' back to Django for saving? I have some kind of working example now. I won't say I savvy it

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread A Melé
Donn, take a look at django-thumbs source code, it integrates PIL and SotrageBackend: http://code.google.com/p/django-thumbs/source/browse/trunk/thumbs.py I hope the code helps you. Regards, Antonio Melé http://django.es/blog/ On 5 ene, 13:30, Donn wrote: > On Monday, 05 January 2009 14:00:

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Donn
On Monday, 05 January 2009 17:50:09 A Melé wrote: > Donn, take a look at django-thumbs source code Many thanks -- it looks familiar now :) \d --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To