I have an ImageField in a model. I also have a ModelForm for this
model. I'm overriding save() so that I can take the image that was
uploaded and make a thumbnail out of it using PIL.

I'm using the simplest of examples just to get started:

...
def save(self):
  from PIL import Image

  im = Image.open(self.logo)  # 'logo' is the image field name
  im.thumbnail((100,100), Image.ANTIALIAS)
  im.save('test.png')

No exception, no errors, but neither was a thumbnail created. I keep
thinking something's going on with the Image.open() method, but I have
no clue what. Any ideas greatly appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to