Example code

> > def clean_image(self):
> >     from django.core.files.images import get_image_dimensions
> >     image = self.cleaned_data['image']
> >     w, h = get_image_dimensions(image)
> >     if w > 640:
> >         raise forms.ValidationError(u'That image is too wide.')
> >     return image

From: http://www.mail-archive.com/[email protected]/msg56817.html


On Sep 20, 4:19 pm, Nick <[EMAIL PROTECTED]> wrote:
> Anybody?  I can't find a simple example of this anywhere so any help
> would be great :)
>
> Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to