src/gui/image/qxpmhandler.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   893         if (image.size() != QSize(w, h) || image.format() != QImage::Format_Indexed8) {
   893         if (image.size() != QSize(w, h) || image.format() != QImage::Format_Indexed8) {
   894             image = QImage(w, h, QImage::Format_Indexed8);
   894             image = QImage(w, h, QImage::Format_Indexed8);
   895             if (image.isNull())
   895             if (image.isNull())
   896                 return false;
   896                 return false;
   897         }
   897         }
   898         image.setNumColors(ncols);
   898         image.setColorCount(ncols);
   899     }
   899     }
   900 
   900 
   901     QMap<quint64, int> colorMap;
   901     QMap<quint64, int> colorMap;
   902     int currentColor;
   902     int currentColor;
   903     bool hasTransparency = false;
   903     bool hasTransparency = false;