I am looking for the fastest way:
- merging (this means creating one image from several images, placing one on the other with respect to their alpha values)
- display images
in Qt. This is my decision:
// --------------------------------------------- --- ------------------------------------
QImage image1 (width, height, QImage::Format_ARGB32); QImage image2 (width, height, QImage::Format_ARGB32); QImage image3 (width, height, QImage::Format_ARGB32);
/ * some image operations * /
QPainter displayPainter (this); displayPainter.drawImage (topLeft, image1, area); displayPainter.drawImage (topLeft, image2, area); displayPainter.drawImage (topLeft, image3, area);
// --------------------------------------------- --- ------------------------------------
If something is better, faster? I found information that QPixmap is better to display on the screen, but this: displayPainter.drawPixmap (.) slower than this: displayPainter.drawImage (.) .
------------------------------------------ EDIT ---- --- -----------------------------------
I want to add that I saw this question: What is the most efficient way to display decoded video frames in Qt?
but in my case, using QGLWidget is a bit more complicated. I use requireitas and it is not stable with paintEvent in QGLWidget. There are no problems with paintGL. Respectfully,