Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grab image of individual frame from QuickTime ActiveX?



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


_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.