#4115: contrib.thumbnails
---------------------------+------------------------------------------------
Reporter: SmileyChris | Owner: nobody
Status: new | Component: Contrib apps
Version: SVN | Resolution:
Keywords: | Stage: Design decision needed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
---------------------------+------------------------------------------------
Comment (by Kellen):
patch version, sorry:
{{{
--- methods.py.orig 2007-12-01 10:55:46.000000000 +0000
+++ methods.py 2007-12-01 10:56:34.000000000 +0000
@@ -7,8 +7,7 @@
img = thumbnail.original_image
size = thumbnail.size
if img.size[0] < size[0] and img.size[1] < size[1]:
- raise ThumbnailTooSmall('Image should be at least %s wide or %s
high' %
- tuple(size))
+ return img
# .thumbnail() method modifies in-place, so create a copy.
img = img.copy()
img.thumbnail(size, Image.ANTIALIAS)
@@ -19,8 +18,7 @@
img = thumbnail.original_image
size = thumbnail.size
if img.size[0] < size[0] or img.size[1] < size[1]:
- raise ThumbnailTooSmall('Image must be at least %s wide and %s
high' %
- tuple(size))
+ return img
# Just use ImageOps.fit (added in PIL 1.1.3)
return ImageOps.fit(img, size, method=Image.ANTIALIAS)
@@ -29,6 +27,5 @@
img = thumbnail.original_image
size = thumbnail.size
if img.size[0] < size[0] or img.size[1] < size[1]:
- raise ThumbnailTooSmall('Image must be at least %s wide and %s
high' %
- tuple(size))
+ return img
return img.resize(size, Image.ANTIALIAS)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/4115#comment:49>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---