From f166d26a4ab0960de3592b6c28af1dd0ac9cc2f6 Mon Sep 17 00:00:00 2001 From: Julius Riegel Date: Sat, 13 Jan 2018 18:04:13 +0100 Subject: [PATCH] Fixing the camera 9 The resolution is now 1/4 --- .idea/workspace.xml | 8 ++++---- lib/graphiclib.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3488ddd..deb51e1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -41,8 +41,8 @@ - - + + @@ -493,8 +493,8 @@ - - + + diff --git a/lib/graphiclib.py b/lib/graphiclib.py index 897b957..dbe2f31 100644 --- a/lib/graphiclib.py +++ b/lib/graphiclib.py @@ -74,7 +74,7 @@ class PiCamera(pygame.sprite.Sprite): pygame.camera.init() camera = picamera.PiCamera() self.camsize = (size[0], int(size[0]/2)) - camera.resolution = self.camsize + camera.resolution = int(self.camsize[0]/2), int(self.camsize[1]/2) self.camera = camera self.output = picamera.array.PiRGBArray(camera, size=self.camsize) self.size = size @@ -87,5 +87,5 @@ class PiCamera(pygame.sprite.Sprite): print('updating camera') self.output.truncate(0) self.camera.capture(self.output, 'rgb', resize=self.camsize) - s = pygame.transform.rotate(pygame.surfarray.make_surface(self.output.array), 90) + s = pygame.transform.rotate(pygame.surfarray.make_surface(self.output.array), 270) self.image.blit(s, (0, 0)) \ No newline at end of file