diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-27 12:09:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-27 12:09:05 +0200 |
commit | e70bef88fdb5ffdf1c2dcf99ac9e22181d18f5ac (patch) | |
tree | 07c97a3c2f5059503c83775e10028481da89b7e3 /ftnoir_tracker_ht/video_widget.cpp | |
parent | c7c3bfc9a1558864b06319918900090c7564c6d2 (diff) |
Implement video widgets properly, so they're fast enough
Diffstat (limited to 'ftnoir_tracker_ht/video_widget.cpp')
-rw-r--r-- | ftnoir_tracker_ht/video_widget.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ftnoir_tracker_ht/video_widget.cpp b/ftnoir_tracker_ht/video_widget.cpp index 01f2516a..1504822d 100644 --- a/ftnoir_tracker_ht/video_widget.cpp +++ b/ftnoir_tracker_ht/video_widget.cpp @@ -14,13 +14,10 @@ using namespace std; void VideoWidget::update_image(unsigned char *frame, int width, int height) { QMutexLocker((QMutex*)&mtx); - QImage qframe = QImage(frame, width, height, 3 * width, QImage::Format_RGB888).rgbSwapped().mirrored(); + QImage qframe = QImage(frame, width, height, 3 * width, QImage::Format_RGB888).rgbSwapped(); if (qframe.size() == size() || (qframe.width() <= this->width() && qframe.height() <= this->height())) - qframe = qframe.mirrored(); + qframe = qframe; else - qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation).mirrored(); - QPainter painter(&qframe); - painter.setPen(Qt::blue); - painter.setBrush(Qt::blue); + qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); pixmap = QPixmap::fromImage(qframe); } |