djangosnippets.org: Latest snippets tagged with 'crop'https://djangosnippets.org/tags/crop/2012-02-13T18:45:06.854535-06:00Signal to resize uploaded Fiber images as new thumbnailed images
2012-02-13T18:45:06.854535-06:00versaehttps://djangosnippets.org/snippets/2684/<p>You only have to put the code in some of your models.py and to have django-fiber installed in your system. Every image uploaded using Fiber admin dialog will be automatically resized and thumbnailed. Or whatever you need to do with it.</p>
Freely redistributableCrop and scale image to a given size
2007-05-10T08:45:28.393657-05:00rpwhttps://djangosnippets.org/snippets/224/<p>Prerequisites: <a href="http://www.pythonware.com/products/pil/">Python Imaging Library</a></p>
<p>This function scales a given image (provided as binary data in any format the PIL supports) to a specified size.</p>
<p>If the force parameter is True, the function makes sure that the resulting image is exactly the specified size, cropping and scaling it as necessary (but …</p>
Freely redistributable