From 40c609e10aef615838095cf7e5583a0d63f56300 Mon Sep 17 00:00:00 2001 From: James Hodgson Date: Fri, 7 Oct 2022 14:56:18 +0100 Subject: [PATCH] #22 try getting rid of weird maths --- src/picamui/picamui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/picamui/picamui.py b/src/picamui/picamui.py index dc34c95..b99718b 100644 --- a/src/picamui/picamui.py +++ b/src/picamui/picamui.py @@ -41,7 +41,7 @@ class PiCamUi: self.uiElements.append(btnExit) def updatePreview(self, rgb, res): - img = pygame.image.frombuffer(rgb[0:(res[0] * res[1] * 3)], res, 'RGB') + img = pygame.image.frombuffer(rgb, res, 'RGB') img = pygame.transform.scale(img, (self.screen.get_width(), self.screen.get_height())) if img: