Quellcode durchsuchen

removed make_thumbnail method

version-14
Anand Doshi vor 12 Jahren
Ursprung
Commit
ec3e506149
1 geänderte Dateien mit 0 neuen und 14 gelöschten Zeilen
  1. +0
    -14
      webnotes/utils/file_manager.py

+ 0
- 14
webnotes/utils/file_manager.py Datei anzeigen

@@ -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

Laden…
Abbrechen
Speichern