OSDN Git Service

make use of monoColorTable() in convert_Indexed8_to_X32()
authorIvailo Monev <xakepa10@gmail.com>
Mon, 23 Aug 2021 15:17:55 +0000 (18:17 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 23 Aug 2021 15:17:55 +0000 (18:17 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qimage.cpp

index bb90d4e..4e87b94 100644 (file)
@@ -2373,9 +2373,7 @@ static void QT_FASTCALL convert_Indexed8_to_X32(QImageData *dest, const QImageDa
 
     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);
+        colorTable = monoColorTable();
     }
 
     int w = src->width;