diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4a18f75..fbd0962 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -136,6 +136,9 @@ void MainWindow::frame_captured(FlyCapture2::Image* image) { void MainWindow::displayPreview(FlyCapture2::Image* last_capture) { // Convert Pixel Format to RGB FlyCapture2::Image last_image; + QImage last_preview_image; + QPixmap last_preview; + FlyCapture2::Error e = last_capture->Convert(FlyCapture2::PIXEL_FORMAT_RGB, &last_image); last_preview_image = QImage(last_image.GetData(), last_image.GetCols(), last_image.GetRows(), QImage::Format_RGB888); diff --git a/src/mainwindow.h b/src/mainwindow.h index cbe6920..5351e9b 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -24,8 +24,6 @@ private: Ui::MainWindow *ui; CameraManager cam_man; Recorder recorder; - QPixmap last_preview; - QImage last_preview_image; void displayPreview(FlyCapture2::Image *last_capture); void disableRecOptions();