yellowmat
30th March 2006, 10:01
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 :
case(QMovie::EndOfFrame):
frame->setPixmap(movie->framePixmap());
break;
As the result was flicker, I decided to use double buffering. Here is the updated code (in the smae function) :
case(QMovie::EndOfFrame):
{
QPixmap pix(movie->framePixmap());
QRect rect(0, 0, pix.width(), pix.height());
bitBlt(frame, rect.topLeft(), &pix, rect);
}
break;
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
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.
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 :
case(QMovie::EndOfFrame):
frame->setPixmap(movie->framePixmap());
break;
As the result was flicker, I decided to use double buffering. Here is the updated code (in the smae function) :
case(QMovie::EndOfFrame):
{
QPixmap pix(movie->framePixmap());
QRect rect(0, 0, pix.width(), pix.height());
bitBlt(frame, rect.topLeft(), &pix, rect);
}
break;
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
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.