I'm looking for the fastest way of:
- merging (it means making one image from couple of images, putting one on other with respect to their alpha values)
- display images
in Qt. This is my solution:
//------------------------------------------------------------------------------------
QImage image1 (width, height, QImage::Format_ARGB32);
QImage image2 (width, height, QImage::Format_ARGB32);
QImage image3 (width, height, QImage::Format_ARGB32);
/* some operations with images */
QPainter displayPainter (this);
displayPainter.drawImage (topLeft, image1, area);
displayPainter.drawImage (topLeft, image2, area);
displayPainter.drawImage (topLeft, image3, area);
//------------------------------------------------------------------------------------
If there exists anything better, faster? I found information, that QPixmap is better for displaying it on a screen, but this:
displayPainter.drawPixmap (.)
is slower then this:
displayPainter.drawImage (.)
.
------------------------------------------ EDIT ------------------------------------------
I want to add that I seen this question: What is the most efficient way to display decoded video frames in Qt?
but in my case using QGLWidget is little bit complicated. I'm using necessitas and this is not stable with paintEvent in QGLWidget. With paintGL has no problem. Regards,