Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
As discussed in http://code.djangoproject.com/ticket/961 and also referenced in http://code.djangoproject.com/ticket/674 and http:// code.djangoproject.com/ticket/425: Original proposal by [EMAIL PROTECTED]: There was some discussion about this in #425 and #674. Attached is a patch that

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
I'm forgot to mention that I'll make a new ImageThumbnailField (as a ImageField subclass) witch will implement all of the my proposals including all of the tags/filters required to make this work. This way I can experiment with thumbnail generation without disturbing main trunk. --- Neb

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread PythonistL
Hi Nebojša, Do you have a good experience with ImageField ? I will have to use images in my app. too but not sure about ImageField . I am thinking about having an extra integer field that has the same number as a picture. The picture will be stored separately from the database and and also a thu

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
On 2005-12-01, at 11:24 CET, PythonistL wrote: Do you have a good experience with ImageField ? I will have to use images in my app. too but not sure about ImageField . I am thinking about having an extra integer field that has the same number as a picture. The picture will be stored separatel

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Pedro Furtado
2005/12/1, Nebojša Đorđević - nesh <[EMAIL PROTECTED]>: And about thumbnails, well, I'm trying to automate this so you willjust need to ask for thumbnail of required size and it will be auto-magically generated for you (PIL is required), same with objectdeletion. Nice! Amazing how things are going

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread PythonistL
Please let know the Django community when you are finished with that. Any timeline? Regards, Lad.

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
On 2005-12-01, at 16:40 CET, PythonistL wrote: Please let know the Django community when you are finished with that. First version is attached to #961, it requires to patch django because that is the only way for me to add some "magic" into model delete method (see save/delete/etc hooks f

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Radek Svarz
Hi, We have been using xt:Commerce for a while and I realized quite nice approach to organize images. There are several subfolders of media for product images, like follows: product_images/original_images product_images/thumbnail_images product_images/info_images product_images/popup_images wher

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
On 2005-12-01, at 17:52 CET, Radek Svarz wrote: I've realized that this is becoming quite a pattern. Would this correlate with your approach? Well, no. I deliberately choose not to have any predefined size for thumbnails to make things more general. Thumbnails are saved in the same direct

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Radek Svarz
> thumbnails to make things more general. Thumbnails are saved in the > same directory as a original file with following filename pattern: OK, but can we make more thumbnails of different sizes from one image simultaneously? And can we add options for image decorations? (shadow, watermark, etc. t

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
On 2005-12-01, at 18:20 CET, Radek Svarz wrote: OK, but can we make more thumbnails of different sizes from one image simultaneously? Thumbnails are generated on the first request from template (i.e src="{{ url|thumbnail:"width=100" }}" />). You can pre-generate some sizes in model _post_sa

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
On 2005-12-01, at 18:52 CET, Nebojša Đorđević - nesh wrote: Details follows I forgot. Just unpack .zip somewhere in your PYTHONPATH to use it. --- Nebojša Đorđević - nesh Studio Quattro - Niš - SCG http://djnesh.blogspot.com/ | http://djnesh-django.blogspot.com/ Registered Linux User 2821

Re: Add automatic thumbnail generation to ImageFields (from ticket #961)

2005-12-01 Thread Nebojša Đorđević - nesh
On 2005-12-01, at 18:57 CET, Nebojša Đorđević - nesh wrote: OK, but can we make more thumbnails of different sizes from one image simultaneously? Thumbnails are generated on the first request from template (i.e ). You can pre- generate some sizes in model _post_save if you want. OTOH i