Show More
@@ -26,10 +26,6 b' def generate_thumb(img, thumb_size, form' | |||
|
26 | 26 | img.seek(0) # see http://code.djangoproject.com/ticket/8222 for details |
|
27 | 27 | image = Image.open(img) |
|
28 | 28 | |
|
29 | # Convert to RGB if necessary | |
|
30 | if image.mode not in ('L', 'RGB'): | |
|
31 | image = image.convert('RGB') | |
|
32 | ||
|
33 | 29 | # get size |
|
34 | 30 | thumb_w, thumb_h = thumb_size |
|
35 | 31 | # If you want to generate a square thumbnail |
General Comments 0
You need to be logged in to leave comments.
Login now