#22 convert bytearray to bytes for PIL
This commit is contained in:
@@ -42,7 +42,7 @@ def main() -> None:
|
||||
now = datetime.now()
|
||||
capture_bytes = camera.capture()
|
||||
|
||||
pil_image = Image.frombuffer(mode='RGB', size=camera.capture_resolution, data=capture_bytes)
|
||||
pil_image = Image.frombuffer(mode='RGB', size=camera.capture_resolution, data=bytes(capture_bytes))
|
||||
|
||||
formatted_filename = now.strftime(config['output_filename_format'])
|
||||
filename = f'{formatted_filename}{config["output_extension"]}'
|
||||
|
||||
Reference in New Issue
Block a user