summaryrefslogtreecommitdiffstats
path: root/tools/qvfb/qvfbview.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-04-23 09:11:02 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-04-23 09:12:57 (GMT)
commite8974548e30a28738b46c681a7e50c27aab27db6 (patch)
treee20491714e3d437638b1c62e958e61dd32b5488d /tools/qvfb/qvfbview.cpp
parent74934cba48910e366d96e4e596e8676d8434fe24 (diff)
downloadQt-e8974548e30a28738b46c681a7e50c27aab27db6.zip
Qt-e8974548e30a28738b46c681a7e50c27aab27db6.tar.gz
Qt-e8974548e30a28738b46c681a7e50c27aab27db6.tar.bz2
Add BGR format to qvfb
Diffstat (limited to 'tools/qvfb/qvfbview.cpp')
-rw-r--r--tools/qvfb/qvfbview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/qvfb/qvfbview.cpp b/tools/qvfb/qvfbview.cpp
index c2df8fd..e7c99ed 100644
--- a/tools/qvfb/qvfbview.cpp
+++ b/tools/qvfb/qvfbview.cpp
@@ -89,7 +89,7 @@ QVFbAbstractView::~QVFbAbstractView()
QVFbView::QVFbView(int id, int w, int h, int d, Rotation r, QWidget *parent)
: QVFbAbstractView(parent),
- viewdepth(d), viewFormat(DefaultFormat), rsh(0), gsh(0), bsh(0), rmax(15), gmax(15), bmax(15),
+ viewdepth(d), viewFormat(DefaultFormat), rgb_swapped(0), rsh(0), gsh(0), bsh(0), rmax(15), gmax(15), bmax(15),
contentsWidth(w), contentsHeight(h), gred(1.0), ggreen(1.0), gblue(1.0),
gammatable(0), refreshRate(30), animation(0),
hzm(0.0), vzm(0.0), mView(0),
@@ -601,6 +601,9 @@ QImage QVFbView::getBuffer(const QRect &r, int &leading) const
break;
}
+ if (rgb_swapped)
+ img = img.rgbSwapped();
+
if ( brightness != 255 ) {
if (img.format() == QImage::Format_Indexed8) {
QVector<QRgb> c = img.colorTable();