|
|
@ -142,7 +142,11 @@ operator<<(QDBusArgument &arg, const QImage &image) |
|
|
|
int channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3); |
|
|
|
int channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3); |
|
|
|
arg << i.depth() / channels; |
|
|
|
arg << i.depth() / channels; |
|
|
|
arg << channels; |
|
|
|
arg << channels; |
|
|
|
|
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) |
|
|
|
|
|
|
|
arg << QByteArray(reinterpret_cast<const char *>(i.bits()), i.byteCount()); |
|
|
|
|
|
|
|
#else |
|
|
|
arg << QByteArray(reinterpret_cast<const char *>(i.bits()), i.sizeInBytes()); |
|
|
|
arg << QByteArray(reinterpret_cast<const char *>(i.bits()), i.sizeInBytes()); |
|
|
|
|
|
|
|
#endif |
|
|
|
arg.endStructure(); |
|
|
|
arg.endStructure(); |
|
|
|
return arg; |
|
|
|
return arg; |
|
|
|
} |
|
|
|
} |
|
|
|