Thanks for the
suggestion -- but is there any way to do this from the QuickTime ActiveX
control?
(CopyFrame(...) isn't documented for the ActiveX
control, and results in a "not found" error if I try to use it with int or
VARIANT or no argument.)
Like I said, maybe I need to bite the bullet and go to
the C++ API...
Sam
At 20:05 23/02/2006, Sam Dutton wrote:
>I'm using the
QuickTime ActiveX control in a Windows XP C++ app using
>the Qt
framework.
>
>Is there any way to get an image of a single frame?
I'm doing
>screengrabs for the moment, which is pretty hacky, though it
works fine
>(just for a preview).
One way is to use the
CopyFrame(VARIANT Time) method of QTMovie to
put a grab of the specified
frame on the clipboard. Then in Qt you
can easily use
QApplication::clipboard() (or the Win32 clipboard
functions) to get the image
in a useable format.
Something like:
VARIANT vTime;
VariantInit(&vTime);
V_I4(&vTime) =
0; // or whatever movie time you want e.g.
PosterTime
movie->CopyFrame(vTime);
QPixmap pm =
QApplication::clipboard()->pixmap();
if (
!pm.isNull() )
{
// Draw movie frame,
etc.
}
Hope this
helps.
_________________________________________________________
John
Cromie
Skylark Associates
Ltd. http://www.skylark.ie