From d9e801fbfa0daa17042f91834bfdddba270ab2da Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 17 Sep 2012 16:13:53 +0400 Subject: [PATCH] improved image rendering performance in Qt backend for highgui UI (bug #2356) --- modules/highgui/src/window_QT.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index fe063c9aaa..9d96e5735c 100755 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -2878,8 +2878,7 @@ QSize DefaultViewPort::sizeHint() const void DefaultViewPort::draw2D(QPainter *painter) { image2Draw_qt = QImage(image2Draw_mat->data.ptr, image2Draw_mat->cols, image2Draw_mat->rows,image2Draw_mat->step,QImage::Format_RGB888); - image2Draw_qt_resized = image2Draw_qt.scaled(viewport()->width(),viewport()->height(),Qt::IgnoreAspectRatio,Qt::FastTransformation);//Qt::SmoothTransformation); - painter->drawImage(0,0,image2Draw_qt_resized); + painter->drawImage(QRect(0,0,viewport()->width(),viewport()->height()), image2Draw_qt, QRect(0,0, image2Draw_qt.width(), image2Draw_qt.height()) ); } //only if CV_8UC1 or CV_8UC3