#22 Minor refactor
This commit is contained in:
@@ -41,10 +41,7 @@ class PiCam1(PiCam):
|
|||||||
out = bytearray((self.preview_resolution[0] * self.preview_resolution[1]) * 3)
|
out = bytearray((self.preview_resolution[0] * self.preview_resolution[1]) * 3)
|
||||||
else:
|
else:
|
||||||
out = bytearray((self.capture_resolution[0] * self.capture_resolution[1]) * 3)
|
out = bytearray((self.capture_resolution[0] * self.capture_resolution[1]) * 3)
|
||||||
|
self.set_camera_resolution(self.capture_resolution) # If preview we'll already have the right resolution
|
||||||
if not preview:
|
|
||||||
# If preview we'll already have the right resolution
|
|
||||||
self.set_camera_resolution(self.capture_resolution)
|
|
||||||
|
|
||||||
bytes_stream = BytesIO()
|
bytes_stream = BytesIO()
|
||||||
self.camera.capture(bytes_stream, format='rgb', use_video_port=preview)
|
self.camera.capture(bytes_stream, format='rgb', use_video_port=preview)
|
||||||
|
|||||||
Reference in New Issue
Block a user