[Companion] Fix crash when converting radio splash image to RGB32 (closes #4420).

This commit is contained in:
Max Paperno
2017-02-07 15:54:29 -05:00
parent 25848a83bb
commit 2589e35ad5
+2 -2
View File
@@ -854,8 +854,8 @@ QPixmap makePixMap(const QImage & image)
QImage result = image.scaled(firmware->getCapability(LcdWidth), firmware->getCapability(LcdHeight));
if (firmware->getCapability(LcdDepth) == 4) {
result = result.convertToFormat(QImage::Format_RGB32);
for (int i = 0; i < image.width(); ++i) {
for (int j = 0; j < image.height(); ++j) {
for (int i = 0; i < result.width(); ++i) {
for (int j = 0; j < result.height(); ++j) {
QRgb col = result.pixel(i, j);
int gray = qGray(col);
result.setPixel(i, j, qRgb(gray, gray, gray));