OSDDBus: Remove use of QImage::isGrayscale, Always expect RGB

Fixes #1205
This commit is contained in:
Jonas Kvinge 2023-06-06 21:43:05 +02:00
parent 331aa382f9
commit 50fcda2763
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ QDBusArgument &operator<<(QDBusArgument &arg, const QImage &image) {
arg << static_cast<qint32>(i.height());
arg << static_cast<qint32>(i.bytesPerLine());
arg << i.hasAlphaChannel();
qint32 channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3);
qint32 channels = i.hasAlphaChannel() ? 4 : 3;
qint32 bitspersample = i.depth() / channels;
arg << bitspersample;
arg << channels;