fix(bug): allows shape to be 2 or 3 dims

This commit is contained in:
Jérome Eertmans
2022-09-11 12:25:09 +02:00
parent c243fe3481
commit d583d591c1

View File

@ -199,7 +199,7 @@ class Display:
)
def resize_frame_to_screen(self, frame: np.ndarray):
frame_height, frame_width = frame.shape
frame_height, frame_width = frame.shape[:2]
scale_height = self.screen_height / frame_height
scale_width = self.screen_width / frame_width