Commit 09849ce0 authored by Joel Collins's avatar Joel Collins
Browse files

Explicit JPEG thumbnail on capture

parent 9ff0aa33
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -484,6 +484,7 @@ class PiCameraStreamer(BaseCamera):
        use_video_port: bool = False,
        resize: Tuple[int, int] = None,
        bayer: bool = True,
        thumbnail: tuple = None
    ):
        """
        Capture a still image to a StreamObject.
@@ -515,6 +516,7 @@ class PiCameraStreamer(BaseCamera):
                resize=resize,
                bayer=(not use_video_port) and bayer,
                use_video_port=use_video_port,
                thumbnail=thumbnail
            )

            # Set resolution and start stream recording if necessary
+4 −0
Original line number Diff line number Diff line
@@ -384,6 +384,9 @@ class Microscope:
            )

            # Capture to output object
            extras = {}
            if fmt == "jpeg":
                extras["thumbnail"] = (200,150,85)
            logging.info("Starting microscope capture %s", output.file)
            self.camera.capture(
                output,
@@ -391,6 +394,7 @@ class Microscope:
                resize=resize,
                bayer=bayer,
                fmt=fmt,
                **extras
            )

        output.put_and_save(tags, annotations, full_metadata)