diff options
Diffstat (limited to 'src/py/cam/cam_qt.py')
-rw-r--r-- | src/py/cam/cam_qt.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/py/cam/cam_qt.py b/src/py/cam/cam_qt.py index 45a30aeb..91be2a08 100644 --- a/src/py/cam/cam_qt.py +++ b/src/py/cam/cam_qt.py @@ -84,8 +84,8 @@ def demosaic(data, r0, g0, g1, b0): def to_rgb(fmt, size, data): - w = size[0] - h = size[1] + w = size.width + h = size.height fmt = str(fmt) @@ -292,7 +292,8 @@ class MainWindow(QtWidgets.QWidget): def buf_to_qpixmap(self, stream, fb): with fb.mmap() as mfb: cfg = stream.configuration - w, h = cfg.size + w = cfg.size.width + h = cfg.size.height pitch = cfg.stride if str(cfg.pixel_format) == 'MJPEG': |