Capturing a Still Image from a Video Stream

After beginning preview of a video stream, call the IWiaVideo::TakePicture method of the IWiaVideo interface to capture a still image from the streaming video. For instructions on how to get an IWiaVideo pointer and begin previewing streaming video, see Previewing Video.

When the IWiaVideo::TakePicture method returns, the pbstrNewImageFilename parameter contains the full path and filename of the resulting image file. The file is in JPEG format. The directory in which the file is created is specified by the value of the IWiaVideo::ImagesDirectory property of the IWiaVideo interface.

Note

Windows Image Acquisition (WIA) does not support video devices in Windows Server 2003, Windows Vista, or later. For those versions of the Windows, use DirectShow to acquire images from video.