From 040a7de445ea8c5a3e7d84b3f73834eb2022f696 Mon Sep 17 00:00:00 2001 From: Balthasar Reuter Date: Sun, 17 Jun 2018 00:02:37 +0200 Subject: [PATCH] Changed picamera format to jpeg --- photobooth/camera/CameraPicamera.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/photobooth/camera/CameraPicamera.py b/photobooth/camera/CameraPicamera.py index 868c36a..5fdb64f 100644 --- a/photobooth/camera/CameraPicamera.py +++ b/photobooth/camera/CameraPicamera.py @@ -43,13 +43,13 @@ class CameraPicamera(Camera): def getPreview(self): stream = io.BytesIO() - self._cap.capture(stream, format='rgb', use_video_port=True) + self._cap.capture(stream, format='jpeg', use_video_port=True) stream.seek(0) - return Image.fromarray(stream) + return Image.open(stream) def getPicture(self): stream = io.BytesIO() - self._cap.capture(stream, format='rgb') + self._cap.capture(stream, format='jpeg') stream.seek(0) - return Image.fromarray(stream) + return Image.open(stream)