From 940442a6864cbfa8de063e2c08abb685c3606b90 Mon Sep 17 00:00:00 2001 From: Hiro Protagonist Date: Tue, 21 Mar 2017 17:45:47 +1300 Subject: [PATCH] dirty_debug --- src/mainwindow.cpp | 4 ++-- src/mainwindow.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1858e37..e20bfcb 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -137,11 +137,11 @@ void MainWindow::displayPreview(FlyCapture2::Image* last_capture) { // Convert Pixel Format to RGB FlyCapture2::Error e = last_capture->Convert(FlyCapture2::PixelFormat::PIXEL_FORMAT_RGB16, &last_image); - QImage tmp(last_image.GetData(), last_capture->GetCols(), last_capture->GetRows(), QImage::Format::Format_RGB16); + last_preview_image = QImage(last_image.GetData(), last_capture->GetCols(), last_capture->GetRows(), QImage::Format::Format_RGB16); ui->preview_widget->setFixedSize(last_capture->GetCols(), last_capture->GetRows()); - last_preview.convertFromImage(tmp); + last_preview.convertFromImage(last_preview_image); ui->preview_widget->setPixmap(last_preview); } diff --git a/src/mainwindow.h b/src/mainwindow.h index afb0ebf..3bfac5a 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -25,6 +25,7 @@ private: CameraManager cam_man; Recorder recorder; QPixmap last_preview; + QImage last_preview_image; FlyCapture2::Image last_image; void displayPreview(FlyCapture2::Image *last_capture);