summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-31 17:34:10 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-31 17:34:10 (GMT)
commit0d411622521a89c04a416e2aaf3da44b6015b183 (patch)
tree51e61cea6b56b40d359a8914f59bf3297a5e0d3e /src/gui/image/qimage.cpp
parent3b65bb32fda7e34373b64f416ea92a3fa6eb266c (diff)
parent20cc50a21eb5841b3a3e8546877e805f5a4df528 (diff)
downloadQt-0d411622521a89c04a416e2aaf3da44b6015b183.zip
Qt-0d411622521a89c04a416e2aaf3da44b6015b183.tar.gz
Qt-0d411622521a89c04a416e2aaf3da44b6015b183.tar.bz2
Merge branch '4.5' into 4.6
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r--src/gui/image/qimage.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 2b82f49..89af452 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2892,6 +2892,12 @@ static void convert_Indexed8_to_X32(QImageData *dest, const QImageData *src, Qt:
Q_ASSERT(src->height == dest->height);
QVector<QRgb> colorTable = fix_color_table(src->colortable, dest->format);
+ if (colorTable.size() == 0) {
+ colorTable.resize(256);
+ for (int i=0; i<256; ++i)
+ colorTable[i] = qRgb(i, i, i);
+
+ }
int w = src->width;
const uchar *src_data = src->data;