Hello, How would one return Image bits to QML from C++?
I have this code in c++:
....
QImage image
= m_pixmap.
copy(sx, sy, sw, sh
).
toImage();
image
= image.
convertToFormat(QImage::Format_ARGB32);
QByteArray bytes
((char *) image.
bits(), image.
byteCount());
return ?????
QImage image = m_pixmap.copy(sx, sy, sw, sh).toImage();
image = image.convertToFormat(QImage::Format_ARGB32);
QByteArray bytes((char *) image.bits(), image.byteCount());
return ?????
To copy to clipboard, switch view to plain text mode
How would I package up the QByteArray properly and return the data to QML in rgba format, so it can be manipulated on the QML side?
Thanks
Bookmarks