ImageEn, unit imageenio

TImageEnIO.OpenMediaFile

TImageEnIO.OpenMediaFile


Declaration

function OpenMediaFile(const FileName: WideString): Integer;


Description

Opens a video file using DirectShow. Supported file types are AVI, MPEG, WMV and other DirectX supported formats.

This method will open the file, but doesn't actually get an image. To get a frame use the LoadFromMediaFile method.

To close the media file use CloseMediaFile.


Example

// Save frame 10 as 'frame10.jpg'
ImageEnView1.IO.OpenMediaFile('C:\film.mpeg');
ImageEnView1.IO.LoadFromMediaFile(10);
ImageEnView1.IO.SaveToFile('D:\frame10.jpg');
ImageEnView1.IO.CloseMediaFile;