removed make_thumbnail method

This commit is contained in:
Anand Doshi 2013-01-09 17:10:49 +05:30
parent d6905fd9dd
commit ec3e506149

View file

@ -220,17 +220,3 @@ def get_files_path():
files_path = os.path.join(os.path.dirname(os.path.abspath(conf.__file__)),
'public', 'files')
return files_path
def make_thumbnail(blob, size):
from PIL import Image
from cStringIO import StringIO
fobj = StringIO(blob)
image = Image.open(fobj)
image.thumbnail((tn,tn*2), Image.ANTIALIAS)
outfile = cStringIO.StringIO()
image.save(outfile, 'JPEG')
outfile.seek(0)
fcontent = outfile.read()
return fcontent