#22 try getting rid of weird maths

This commit is contained in:
James Hodgson
2022-10-07 14:56:18 +01:00
parent 09c13f4fcc
commit 40c609e10a

View File

@@ -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: