removed make_thumbnail method
This commit is contained in:
parent
d6905fd9dd
commit
ec3e506149
1 changed files with 0 additions and 14 deletions
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue