#22 Remove helper functions
This commit is contained in:
@@ -31,7 +31,7 @@ def main() -> None:
|
||||
while loop:
|
||||
preview_bytes = camera.capture_preview()
|
||||
|
||||
ui.updatePreview(preview_bytes, camera.get_preview_resolution())
|
||||
ui.updatePreview(preview_bytes, camera.preview_resolution)
|
||||
ui.update()
|
||||
|
||||
ui_events = ui.getEvents()
|
||||
@@ -42,7 +42,7 @@ def main() -> None:
|
||||
now = datetime.now()
|
||||
capture_bytes = camera.capture()
|
||||
|
||||
pil_image = Image.frombuffer(mode='RGB', size=camera.get_capture_resolution(), data=capture_bytes)
|
||||
pil_image = Image.frombuffer(mode='RGB', size=camera.capture_resolution, data=capture_bytes)
|
||||
|
||||
formatted_filename = now.strftime(config['output_filename_format'])
|
||||
filename = f'{formatted_filename}{config["output_extension"]}'
|
||||
|
||||
@@ -17,20 +17,6 @@ class PiCam:
|
||||
"""
|
||||
self.preview_resolution = resolution
|
||||
|
||||
def get_preview_resolution(self) -> "tuple[int, int]":
|
||||
"""Get the current preview resolution
|
||||
|
||||
:returns: Tuple containing current preview resolution (x, y)
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_capture_resolution(self) -> "tuple[int, int]":
|
||||
"""Get the current capture resolution
|
||||
|
||||
:returns: Tuple containing current capture resolution (x, y)
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def capture(self) -> bytes:
|
||||
"""Capture an image
|
||||
|
||||
|
||||
Reference in New Issue
Block a user