Hello friends,
I am getting an image into a databuffer and after I want to display it on screen. I did something like that:
Here I put the image into databuffer...
code:
for(i=1; i<=packNum ;i++) {
Get_Image_Data(dataBuffer,512,&rec);//I read 512 bytes size per package from the port..
arr.append(dataBuffer);
}
for(i=1; i<=packNum ;i++) {
Get_Image_Data(dataBuffer,512,&rec);//I read 512 bytes size per package from the port..
arr.append(dataBuffer);
}
To copy to clipboard, switch view to plain text mode
Here I display the image on screen...
code:
image->loadFromData(arr.data());
label->setPixmap(*image);
QPixmap image = new QPixmap();
image->loadFromData(arr.data());
label->setPixmap(*image);
To copy to clipboard, switch view to plain text mode
I see in the log that as data comes continuously(like video ), size of the "arr" changes. I mean , something really fills "arr"... But nothing is displayed on the screen... Any idea ..? Thanks....
Bookmarks