Hi !
I'm trying to use a QMovie object to dislpay animation files ith extension .mng.
I First tryed without using double buffering. Here is a part of my code implemented in a SLOT connected using the QMovie::connectStatus function :
frame->setPixmap(movie->framePixmap());
break;
case(QMovie::EndOfFrame):
frame->setPixmap(movie->framePixmap());
break;
To copy to clipboard, switch view to plain text mode
As the result was flicker, I decided to use double buffering. Here is the updated code (in the smae function) :
{
QRect rect
(0,
0, pix.
width(), pix.
height());
bitBlt(frame, rect.topLeft(), &pix, rect);
}
break;
case(QMovie::EndOfFrame):
{
QPixmap pix(movie->framePixmap());
QRect rect(0, 0, pix.width(), pix.height());
bitBlt(frame, rect.topLeft(), &pix, rect);
}
break;
To copy to clipboard, switch view to plain text mode
I have two problems :
1. When trying to display big animations the first frame is displayed partially and the others are not displayed, and I can read in the debug traces the following message :
MNG error 11: (null); chunk IDAT; subcode 0:0
MNG error 11: (null); chunk IDAT; subcode 0:0
To copy to clipboard, switch view to plain text mode
So what's wrong ?
2. In order to display big animations, I tryed to use a small one and then to resize it, but the result is not the one I expected : the pixmap size is resized but its content is not stretch, why ?
Thanks in advance.
Bookmarks