diff --git a/openflexure_microscope/api/v2/views/camera.py b/openflexure_microscope/api/v2/views/camera.py index 2dc22042..c1fe4a89 100644 --- a/openflexure_microscope/api/v2/views/camera.py +++ b/openflexure_microscope/api/v2/views/camera.py @@ -1,6 +1,7 @@ +import datetime import logging from io import BytesIO -import datetime + import numpy as np from flask import send_file from labthings import find_component @@ -45,6 +46,5 @@ class LSTImageProperty(PropertyView): Image.fromarray(np.uint8(all_channels), "L").save(img_bytes, "PNG") img_bytes.seek(0) # Return the image - #return Response(img_bytes.getvalue(), mimetype="image/png") fname = f"lst-{datetime.date.today().isoformat()}.png" return send_file(img_bytes, as_attachment=True, attachment_filename=fname)