Thanks a lot. The image is PNG and the format QImage::Format_ARGB32 have done the work. My end realisation actually is a bit differend and I hope more fast:
void onImage(int height, int width, int* data)
{
for (int i = 0; i < height; ++i)
memcpy(image.scanLine(i), data + i * width, width * 4);
}
void onImage(int height, int width, int* data)
{
QImage image = QImage( width, height, QImage::Format_ARGB32 );
for (int i = 0; i < height; ++i)
memcpy(image.scanLine(i), data + i * width, width * 4);
}
To copy to clipboard, switch view to plain text mode
I hope that this will be useful for others that have my issue.
Bookmarks