Re: Automatic Image Resizing upon Upload

2008-07-13 Thread Alex Ezell
On Sat, Jul 12, 2008 at 6:37 AM, TheBoff <[EMAIL PROTECTED]> wrote:

>
> Photologue is perhaps a bit heavyweight for my current purposes,
> although it looks like an extremely impressive bit of kit, and were I
> to make a dedicated photo gallery etc app with django, I would
> certainly use it.


This is the exact reason I just used sorl-thumbnail:
http://code.google.com/p/sorl-thumbnail/

It's a dead easy template tag and it works great.

Photologue is really, really nice. It's just a little more than I need right
now.

/alex

On Jul 11, 8:39 pm, blis102 <[EMAIL PROTECTED]> wrote:
> > You could also use django-photologue. Its quite powerful and very
> > useful in templates:
> >
> > http://code.google.com/p/django-photologue/
> >
> > Cheers,
> > Dana
> >
> > On Jul 11, 12:47 am, "Ben Ford" <[EMAIL PROTECTED]> wrote:
> >
> > > Or you could have a look at google appengine for your image storage.
> They
> > > have an picassa like API that would allow you to do lots of stuff to
> your
> > > images on the fly and you wouldn't pay for any of the processor cost
> (or
> > > storage if you're under 500M). Just a thought.
> > > Ben
> >
> > > 2008/7/11 Eric Abrahamsen <[EMAIL PROTECTED]>:
> >
> > > > It's intensive, but not prohibitively so. I've used a few setups
> where
> > > > large image files were uploaded and, depending on the options, two or
> > > > even three different versions of the image are created in the save()
> > > > method. The server has yet to explode. Try poking through some of
> > > > these snippets and see if anything appeals to you:
> >
> > > >http://www.djangosnippets.org/tags/thumbnail/
> >
> > > > Eric
> >
> > > > On Jul 11, 2008, at 3:53 AM, TheBoff wrote:
> >
> > > > > To jump straight in to the question:
> >
> > > > > I'm wrinting a website using the automatic admin interface, and am
> > > > > wondering if there's any way to create a thumbnail automatically
> upon
> > > > > the upload of the image.
> >
> > > > > I know I could set it as a property, and use PIL to do it on the
> fly
> > > > > (well I assume I could, I haven't checked it in any detail!), but
> > > > > wouldn't that be hugely processor intensive?
> >
> > > --
> > > Regards,
> > > Ben Ford
> > > [EMAIL PROTECTED]
> > > +447792598685
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic Image Resizing upon Upload

2008-07-13 Thread Justin

In case other's have the same need, one of the features of the
upcoming 2.0 release of Photologue is that all resizing, cacheing,
(etc.) behaviors have be put in an abstract base class. When you
subclass Photologue.models.ImageModel with your own models they
inherit the basic functionailty of a Photologue Photo. Including admin
thumbnail previews and effects processing. This way if you just the
image manipulation code and few other goodies, you can use the base
model and never touch the templates or the other gallery stuff. There
is a 2.0 preview release available now for testing.

- Justin

On Jul 12, 9:00 am, TheBoff <[EMAIL PROTECTED]> wrote:
> I've actually realised I've been an idiot: seen as models are
> subclasses of models.Model, I should be able to just call
> model.Model.save() from within the custom save method! And my other
> idea wouldn't work if the image were changed.
>
> On Jul 12, 12:37 pm, TheBoff <[EMAIL PROTECTED]> wrote:
>
> > Wow: thanks for all the replies guys!
>
> > Photologue is perhaps a bit heavyweight for my current purposes,
> > although it looks like an extremely impressive bit of kit, and were I
> > to make a dedicated photo gallery etc app with django, I would
> > certainly use it.
>
> > Embedding something in the save method seems like a very good idea: I
> > can't work out how to do it without breaking the current save
> > functionality in the model, so I think I'll probably do it as a new
> > classes style property: no setter, because it's automatic, but the
> > getter will try and load the image from a file, and if that fails
> > create the file using PIL functionality.
>
> > Colin
>
> > On Jul 11, 8:39 pm, blis102 <[EMAIL PROTECTED]> wrote:
>
> > > You could also use django-photologue. Its quite powerful and very
> > > useful in templates:
>
> > >http://code.google.com/p/django-photologue/
>
> > > Cheers,
> > > Dana
>
> > > On Jul 11, 12:47 am, "Ben Ford" <[EMAIL PROTECTED]> wrote:
>
> > > > Or you could have a look at google appengine for your image storage. 
> > > > They
> > > > have an picassa like API that would allow you to do lots of stuff to 
> > > > your
> > > > images on the fly and you wouldn't pay for any of the processor cost (or
> > > > storage if you're under 500M). Just a thought.
> > > > Ben
>
> > > > 2008/7/11 Eric Abrahamsen <[EMAIL PROTECTED]>:
>
> > > > > It's intensive, but not prohibitively so. I've used a few setups where
> > > > > large image files were uploaded and, depending on the options, two or
> > > > > even three different versions of the image are created in the save()
> > > > > method. The server has yet to explode. Try poking through some of
> > > > > these snippets and see if anything appeals to you:
>
> > > > >http://www.djangosnippets.org/tags/thumbnail/
>
> > > > > Eric
>
> > > > > On Jul 11, 2008, at 3:53 AM, TheBoff wrote:
>
> > > > > > To jump straight in to the question:
>
> > > > > > I'm wrinting a website using the automatic admin interface, and am
> > > > > > wondering if there's any way to create a thumbnail automatically 
> > > > > > upon
> > > > > > the upload of the image.
>
> > > > > > I know I could set it as a property, and use PIL to do it on the fly
> > > > > > (well I assume I could, I haven't checked it in any detail!), but
> > > > > > wouldn't that be hugely processor intensive?
>
> > > > --
> > > > Regards,
> > > > Ben Ford
> > > > [EMAIL PROTECTED]
> > > > +447792598685
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic Image Resizing upon Upload

2008-07-12 Thread TheBoff

I've actually realised I've been an idiot: seen as models are
subclasses of models.Model, I should be able to just call
model.Model.save() from within the custom save method! And my other
idea wouldn't work if the image were changed.

On Jul 12, 12:37 pm, TheBoff <[EMAIL PROTECTED]> wrote:
> Wow: thanks for all the replies guys!
>
> Photologue is perhaps a bit heavyweight for my current purposes,
> although it looks like an extremely impressive bit of kit, and were I
> to make a dedicated photo gallery etc app with django, I would
> certainly use it.
>
> Embedding something in the save method seems like a very good idea: I
> can't work out how to do it without breaking the current save
> functionality in the model, so I think I'll probably do it as a new
> classes style property: no setter, because it's automatic, but the
> getter will try and load the image from a file, and if that fails
> create the file using PIL functionality.
>
> Colin
>
> On Jul 11, 8:39 pm, blis102 <[EMAIL PROTECTED]> wrote:
>
> > You could also use django-photologue. Its quite powerful and very
> > useful in templates:
>
> >http://code.google.com/p/django-photologue/
>
> > Cheers,
> > Dana
>
> > On Jul 11, 12:47 am, "Ben Ford" <[EMAIL PROTECTED]> wrote:
>
> > > Or you could have a look at google appengine for your image storage. They
> > > have an picassa like API that would allow you to do lots of stuff to your
> > > images on the fly and you wouldn't pay for any of the processor cost (or
> > > storage if you're under 500M). Just a thought.
> > > Ben
>
> > > 2008/7/11 Eric Abrahamsen <[EMAIL PROTECTED]>:
>
> > > > It's intensive, but not prohibitively so. I've used a few setups where
> > > > large image files were uploaded and, depending on the options, two or
> > > > even three different versions of the image are created in the save()
> > > > method. The server has yet to explode. Try poking through some of
> > > > these snippets and see if anything appeals to you:
>
> > > >http://www.djangosnippets.org/tags/thumbnail/
>
> > > > Eric
>
> > > > On Jul 11, 2008, at 3:53 AM, TheBoff wrote:
>
> > > > > To jump straight in to the question:
>
> > > > > I'm wrinting a website using the automatic admin interface, and am
> > > > > wondering if there's any way to create a thumbnail automatically upon
> > > > > the upload of the image.
>
> > > > > I know I could set it as a property, and use PIL to do it on the fly
> > > > > (well I assume I could, I haven't checked it in any detail!), but
> > > > > wouldn't that be hugely processor intensive?
>
> > > --
> > > Regards,
> > > Ben Ford
> > > [EMAIL PROTECTED]
> > > +447792598685
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic Image Resizing upon Upload

2008-07-11 Thread blis102

You could also use django-photologue. Its quite powerful and very
useful in templates:

http://code.google.com/p/django-photologue/

Cheers,
Dana

On Jul 11, 12:47 am, "Ben Ford" <[EMAIL PROTECTED]> wrote:
> Or you could have a look at google appengine for your image storage. They
> have an picassa like API that would allow you to do lots of stuff to your
> images on the fly and you wouldn't pay for any of the processor cost (or
> storage if you're under 500M). Just a thought.
> Ben
>
> 2008/7/11 Eric Abrahamsen <[EMAIL PROTECTED]>:
>
>
>
>
>
> > It's intensive, but not prohibitively so. I've used a few setups where
> > large image files were uploaded and, depending on the options, two or
> > even three different versions of the image are created in the save()
> > method. The server has yet to explode. Try poking through some of
> > these snippets and see if anything appeals to you:
>
> >http://www.djangosnippets.org/tags/thumbnail/
>
> > Eric
>
> > On Jul 11, 2008, at 3:53 AM, TheBoff wrote:
>
> > > To jump straight in to the question:
>
> > > I'm wrinting a website using the automatic admin interface, and am
> > > wondering if there's any way to create a thumbnail automatically upon
> > > the upload of the image.
>
> > > I know I could set it as a property, and use PIL to do it on the fly
> > > (well I assume I could, I haven't checked it in any detail!), but
> > > wouldn't that be hugely processor intensive?
>
> --
> Regards,
> Ben Ford
> [EMAIL PROTECTED]
> +447792598685
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic Image Resizing upon Upload

2008-07-11 Thread Ben Ford
Or you could have a look at google appengine for your image storage. They
have an picassa like API that would allow you to do lots of stuff to your
images on the fly and you wouldn't pay for any of the processor cost (or
storage if you're under 500M). Just a thought.
Ben

2008/7/11 Eric Abrahamsen <[EMAIL PROTECTED]>:

>
> It's intensive, but not prohibitively so. I've used a few setups where
> large image files were uploaded and, depending on the options, two or
> even three different versions of the image are created in the save()
> method. The server has yet to explode. Try poking through some of
> these snippets and see if anything appeals to you:
>
> http://www.djangosnippets.org/tags/thumbnail/
>
> Eric
>
>
> On Jul 11, 2008, at 3:53 AM, TheBoff wrote:
>
> >
> > To jump straight in to the question:
> >
> > I'm wrinting a website using the automatic admin interface, and am
> > wondering if there's any way to create a thumbnail automatically upon
> > the upload of the image.
> >
> > I know I could set it as a property, and use PIL to do it on the fly
> > (well I assume I could, I haven't checked it in any detail!), but
> > wouldn't that be hugely processor intensive?
> >
> > >
>
>
> >
>


-- 
Regards,
Ben Ford
[EMAIL PROTECTED]
+447792598685

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Automatic Image Resizing upon Upload

2008-07-10 Thread Eric Abrahamsen

It's intensive, but not prohibitively so. I've used a few setups where  
large image files were uploaded and, depending on the options, two or  
even three different versions of the image are created in the save()  
method. The server has yet to explode. Try poking through some of  
these snippets and see if anything appeals to you:

http://www.djangosnippets.org/tags/thumbnail/

Eric


On Jul 11, 2008, at 3:53 AM, TheBoff wrote:

>
> To jump straight in to the question:
>
> I'm wrinting a website using the automatic admin interface, and am
> wondering if there's any way to create a thumbnail automatically upon
> the upload of the image.
>
> I know I could set it as a property, and use PIL to do it on the fly
> (well I assume I could, I haven't checked it in any detail!), but
> wouldn't that be hugely processor intensive?
>
> >


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Automatic Image Resizing upon Upload

2008-07-10 Thread TheBoff

To jump straight in to the question:

I'm wrinting a website using the automatic admin interface, and am
wondering if there's any way to create a thumbnail automatically upon
the upload of the image.

I know I could set it as a property, and use PIL to do it on the fly
(well I assume I could, I haven't checked it in any detail!), but
wouldn't that be hugely processor intensive?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---