try fixing weather image
This commit is contained in:
@@ -94,7 +94,9 @@ def dashboard():
|
||||
days=days,
|
||||
today=today,
|
||||
weather=weather(),
|
||||
extra_debug=extra_debug
|
||||
extra_debug=extra_debug,
|
||||
HOST = os.getenv('HOST'),
|
||||
HOST_PORT = os.getenv('HOST_PORT')
|
||||
)
|
||||
|
||||
@app.route('/image')
|
||||
@@ -120,6 +122,6 @@ def dashboard_image():
|
||||
# css=os.path.join(os.path.dirname(__file__),'static','style.css')
|
||||
)
|
||||
image_file = Image.open(out_file) # open colour image
|
||||
image_file = ImageOps.grayscale(image_file)
|
||||
# image_file = ImageOps.grayscale(image_file)
|
||||
image_file.save(out_file, 'BMP')
|
||||
return send_from_directory(directory = 'static', path=f'out.{extension}', as_attachment=False, attachment_filename=f'out.{extension}')
|
||||
|
||||
Reference in New Issue
Block a user