summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-04-17 14:59:26 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-04-17 15:05:05 (GMT)
commite018b82432055d9a5f13be7c17e31502830b9fa7 (patch)
tree527d90f9076b1a5f9eeee60f9a0372a819876c87 /src/gui/image
parent7a02f249edc179426159e66680ca4421c3c44309 (diff)
downloadQt-e018b82432055d9a5f13be7c17e31502830b9fa7.zip
Qt-e018b82432055d9a5f13be7c17e31502830b9fa7.tar.gz
Qt-e018b82432055d9a5f13be7c17e31502830b9fa7.tar.bz2
Fix an endianess issue with 32 bit pixmaps on big endian systems.
On big endian systems with Xrender, the QPixmap::toImage() function did an unnecessary byte swap for 32 bit pixmaps. Task-number: 196152 Reviewed-by: Samuel
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap_x11.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index ff7c1b6..38916c7 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -1437,7 +1437,7 @@ QImage QX11PixmapData::toImage() const
// we may have to swap the byte order
if ((QSysInfo::ByteOrder == QSysInfo::LittleEndian && xi->byte_order == MSBFirst)
- || (QSysInfo::ByteOrder == QSysInfo::BigEndian))
+ || (QSysInfo::ByteOrder == QSysInfo::BigEndian && xi->byte_order == LSBFirst))
{
for (int i=0; i < image.height(); i++) {
uint *p = (uint*)image.scanLine(i);