This class is used to read frames from video files using QuickTime framework.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill.Codecs.MediaProcessor (in Aurigma.GraphicsMill.Codecs.MediaProcessor.dll)
Public NotInheritable Class QTReader _ Inherits FormatReader _ Implements IMediaProcessorMetadataReadSupport, ITimeReader
public sealed class QTReader : FormatReader, IMediaProcessorMetadataReadSupport, ITimeReader
QuickTime opens files of almost all formats, though it is a bit slow. This framework is recommended to use when reading MOV and different graphic formats. For the list of supported file formats, see the System Requirements section of the manual.
Video files are represented as a sequence of images which are called frames. The QTReader class allows extracting frames using the LoadFrame(Int32) method. Also, the reader object can be interpreted as a collection of frames, and therefore the frames can be enumerated using the foreach
statement.
A QTReader object can be used not only to read video data, but also to extract some information about the opened file. For example, you can get:
In general the reader usage workflow should be as follows:
You cannot get any data from the reader until you open it on some file.
Iterate through each frame in the reader using the LoadFrame(Int32) method. It will return a QTFrame class instance. To extract the image from the frame, use the GetBitmap(Bitmap) method.
To get the total number of the frames in the reader, read the FrameCount property.
Private Sub QTReaderUsage(ByVal aPath As String) Dim aReader As QTReader = New QTReader(aPath) 'Work with the reader aReader.Dispose() End Sub
private void QTReaderUsage(String aPath) { QTReader aReader = new QTReader(aPath); //Work with the reader aReader.Dispose(); }