diff --git a/openflexure_microscope/camera/pi.py b/openflexure_microscope/camera/pi.py index d49af7e9..65fd8c35 100644 --- a/openflexure_microscope/camera/pi.py +++ b/openflexure_microscope/camera/pi.py @@ -484,7 +484,7 @@ class PiCameraStreamer(BaseCamera): use_video_port: bool = False, resize: Tuple[int, int] = None, bayer: bool = True, - thumbnail: tuple = None + thumbnail: tuple = None, ): """ Capture a still image to a StreamObject. @@ -516,7 +516,7 @@ class PiCameraStreamer(BaseCamera): resize=resize, bayer=(not use_video_port) and bayer, use_video_port=use_video_port, - thumbnail=thumbnail + thumbnail=thumbnail, ) # Set resolution and start stream recording if necessary diff --git a/openflexure_microscope/captures/capture.py b/openflexure_microscope/captures/capture.py index 2550c59d..ecee9462 100644 --- a/openflexure_microscope/captures/capture.py +++ b/openflexure_microscope/captures/capture.py @@ -8,13 +8,11 @@ import uuid from collections import OrderedDict import dateutil.parser -from PIL import Image from openflexure_microscope.camera import piexif from openflexure_microscope.camera.piexif._exceptions import InvalidImageDataError from openflexure_microscope.config import JSONEncoder -PIL_FORMATS = ["JPG", "JPEG", "PNG", "TIF", "TIFF"] EXIF_FORMATS = ["JPG", "JPEG", "TIF", "TIFF"] diff --git a/openflexure_microscope/microscope.py b/openflexure_microscope/microscope.py index f68ca1d9..22824815 100644 --- a/openflexure_microscope/microscope.py +++ b/openflexure_microscope/microscope.py @@ -386,7 +386,7 @@ class Microscope: # Capture to output object extras = {} if fmt == "jpeg": - extras["thumbnail"] = (200,150,85) + extras["thumbnail"] = (200, 150, 85) logging.info("Starting microscope capture %s", output.file) self.camera.capture( output, @@ -394,7 +394,7 @@ class Microscope: resize=resize, bayer=bayer, fmt=fmt, - **extras + **extras, ) output.put_and_save(tags, annotations, full_metadata)