Open xixiU opened 5 years ago
just #52 shows,I changed to those following: ` @app.route('/large/') def static_file_large(path): try: return open("ui/large/" + path).read() except: base_dir =os.getcwd() print('here %s'%("ui/large/" + path)) image = Image.open(os.path.join(base_dir,"ui","large" , path),mode='r') imgByteArr = BytesIO() image.save(imgByteArr,format='PNG') return imgByteArr
#return send_file("ui/large/" + path, mimetype='image/gif')#Image.open("ui/large/" + path)
` but when i oepn the browser,there is nothing showed.The sceen is full of blank,what should i do
just #52 shows,I changed to those following: ` @app.route('/large/')
def static_file_large(path):
try:
return open("ui/large/" + path).read()
except:
base_dir =os.getcwd()
print('here %s'%("ui/large/" + path))
image = Image.open(os.path.join(base_dir,"ui","large" , path),mode='r')
imgByteArr = BytesIO()
image.save(imgByteArr,format='PNG')
return imgByteArr
return send_file(imgByteArr, mimetype="image/jpeg")#"ui/large/" + path
` but when i oepn the browser,there is nothing showed.The sceen is full of blank,what should i do