Code formatting and linting

This commit is contained in:
Joel Collins 2020-10-27 14:14:59 +00:00
parent 13b4c84783
commit 250fd07e9a
3 changed files with 4 additions and 6 deletions

View file

@ -484,7 +484,7 @@ class PiCameraStreamer(BaseCamera):
use_video_port: bool = False, use_video_port: bool = False,
resize: Tuple[int, int] = None, resize: Tuple[int, int] = None,
bayer: bool = True, bayer: bool = True,
thumbnail: tuple = None thumbnail: tuple = None,
): ):
""" """
Capture a still image to a StreamObject. Capture a still image to a StreamObject.
@ -516,7 +516,7 @@ class PiCameraStreamer(BaseCamera):
resize=resize, resize=resize,
bayer=(not use_video_port) and bayer, bayer=(not use_video_port) and bayer,
use_video_port=use_video_port, use_video_port=use_video_port,
thumbnail=thumbnail thumbnail=thumbnail,
) )
# Set resolution and start stream recording if necessary # Set resolution and start stream recording if necessary

View file

@ -8,13 +8,11 @@ import uuid
from collections import OrderedDict from collections import OrderedDict
import dateutil.parser import dateutil.parser
from PIL import Image
from openflexure_microscope.camera import piexif from openflexure_microscope.camera import piexif
from openflexure_microscope.camera.piexif._exceptions import InvalidImageDataError from openflexure_microscope.camera.piexif._exceptions import InvalidImageDataError
from openflexure_microscope.config import JSONEncoder from openflexure_microscope.config import JSONEncoder
PIL_FORMATS = ["JPG", "JPEG", "PNG", "TIF", "TIFF"]
EXIF_FORMATS = ["JPG", "JPEG", "TIF", "TIFF"] EXIF_FORMATS = ["JPG", "JPEG", "TIF", "TIFF"]

View file

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