djangosnippets.org: Latest snippets tagged with 'thumbnails'http://djangosnippets.org/tags/thumbnails/2016-01-21T05:28:41.565679-06:00Dynamic Thumbnail for ImageField
2016-01-21T05:28:41.565679-06:00agusmakmunhttp://djangosnippets.org/snippets/10549/<p>Dynamic Thumbnail for <code>ImageField</code> with <code>Pillow</code>.</p>
Freely redistributableImage model with thumbnail
2010-07-04T19:28:41.438706-05:00clawlorhttp://djangosnippets.org/snippets/2094/<p>A relatively simple Photo model which generates its own thumbnail when saved. A default size is specified as <code>thumb_size</code> in the <code>save()</code> arguments.</p>
<p>Other thumbnailing strategies don't save the thumbnail dimensions, and since the actual dimensions of the thumbnail created by PIL's <code>thumbnail</code> method are somewhat non-deterministic, it is difficult …</p>
Freely redistributableUnsharp Mask with PIL and PythonMagick
2008-12-28T17:44:18.255770-06:00VidJahttp://djangosnippets.org/snippets/1267/<p><strong>A Magick PIL</strong></p>
<p>I used to do my image conversions with ImageMagick and system calls back in my PHP days. With Django PIL is the obvious choice for most image stuff, but frustrated by the lack of a proper unsharp mask function for PIL I found some code in the …</p>
Freely redistributableImageWithThumbsField
2008-12-23T06:43:58.227513-06:00zenxhttp://djangosnippets.org/snippets/1260/<p>Easy way to generate image thumbnails for your models. Works with any Storage Backend.</p>
<p>From: <a href="http://code.google.com/p/django-thumbs/">http://code.google.com/p/django-thumbs/</a></p>
<h1><strong>Usage example:</strong></h1>
<p>photo = ImageWithThumbsField(upload_to='images', sizes=((125,125),(300,200),)</p>
<p>To retrieve image URL, exactly the same way as with ImageField:
my_object.photo.url</p>
<p>To retrieve thumbnails URL's just add the size to it:
my_object.photo.url_125x125
my_object.photo.url_300x200</p>
<p>Note: The 'sizes' attribute …</p>
Freely redistributable