Better cache. Better gc.

This commit is contained in:
Jason A. Donenfeld committed 2011-05-06 03:19:20 -04:00
1 parent 319ac51d60
commit 9220ea44b5
2 files changed
+15 -7

No files matched your search

+1
View File
@@ -146,6 +146,7 @@ class Photo(object):
right = image.size[0]
bottom = image.size[1] - ((image.size[1] - image.size[0]) / 2)
image = image.crop((left, top, right, bottom))
gc.collect()
image.thumbnail((size, size), Image.ANTIALIAS)
try:
image.save(thumb_path, "JPEG")