#22 Minor refactor

This commit is contained in:
James Hodgson
2022-10-07 15:32:29 +01:00
parent 791c32cb5c
commit bdb5c39d0c

View File

@@ -41,10 +41,7 @@ class PiCam1(PiCam):
out = bytearray((self.preview_resolution[0] * self.preview_resolution[1]) * 3)
else:
out = bytearray((self.capture_resolution[0] * self.capture_resolution[1]) * 3)
if not preview:
# If preview we'll already have the right resolution
self.set_camera_resolution(self.capture_resolution)
self.set_camera_resolution(self.capture_resolution) # If preview we'll already have the right resolution
bytes_stream = BytesIO()
self.camera.capture(bytes_stream, format='rgb', use_video_port=preview)