diff --git a/.gitignore b/.gitignore index ef29265..74a106c 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ client/janus_gateway_win/x64/ client/janus_gateway_win/janus_win/x64/ client/janus_gateway_win/.vs/ client/janus_gateway_win/usocket_test/x64/ +client/build-webrtc_capture-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/ diff --git a/client/webrtc_capture/src/mainwindow.cpp b/client/webrtc_capture/src/mainwindow.cpp index df70662..b65773c 100644 --- a/client/webrtc_capture/src/mainwindow.cpp +++ b/client/webrtc_capture/src/mainwindow.cpp @@ -149,14 +149,11 @@ cv::Mat *QImage2cvMat(QImage image) case QImage::Format_ARGB32_Premultiplied: mat = new cv::Mat(image.height(), image.width(), - CV_8UC4, - image.bits(), - image.bytesPerLine()); + CV_8UC4); memcpy(mat->data,image.bits(),image.bytesPerLine()*image.height()); break; case QImage::Format_RGB888: mat = new cv::Mat(image.height(), image.width(), CV_8UC3, (void*)image.bits(), image.bytesPerLine()); -// cv::cvtColor(mat, mat, CV_BGR2RGB); break; case QImage::Format_Indexed8: mat = new cv::Mat(image.height(), image.width(), CV_8UC1, (void*)image.bits(), image.bytesPerLine()); @@ -177,14 +174,13 @@ void MainWindow::on_pushButton_2_clicked() qDebug()<<"format is "<processed_picture->setPixmap(QPixmap::fromImage(image)); }