Skip to content

Commit

Permalink
[Companion] Fix crash when converting radio splash image to RGB32 (cl…
Browse files Browse the repository at this point in the history
…oses opentx#4420).
  • Loading branch information
mpaperno committed Feb 7, 2017
1 parent 25848a8 commit 2589e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions companion/src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 2589e35

Please sign in to comment.