Fix grayscale bug AGAIN

pull/1011/merge
Nicolas Werner 3 years ago
parent f688e15379
commit 01019450cf
  1. 2
      src/dbus/NhekoDBusApi.cpp

@ -118,7 +118,7 @@ operator<<(QDBusArgument &arg, const QImage &image)
arg << i.height();
arg << i.bytesPerLine();
arg << i.hasAlphaChannel();
int channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3);
int channels = i.hasAlphaChannel() ? 4 : 3;
arg << i.depth() / channels;
arg << channels;
arg << QByteArray(reinterpret_cast<const char *>(i.bits()), i.sizeInBytes());

Loading…
Cancel
Save