I wonder why do you use QImage as a temporary data container?
Wouldn't it be easier and faster to use QByteArray to store the data and load it directly to QPixmap?
I wonder why do you use QImage as a temporary data container?
Wouldn't it be easier and faster to use QByteArray to store the data and load it directly to QPixmap?
Because my original goal was to do the JPEG decoding on a secondary thread. QPixmap cannot run on a secondary thread but QImage can. Therefore I load (which does the decode) QImage on the secondary thread, then let QPixmap render the image on the GUI thread.
Bookmarks