This documentation is for the old version. Go to the latest Graphics Mill docs

MediaFormatManager.CreateFormatReader Method (String)

Creates and initializes a new IFormatReader class instance, opening the specified file.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill.Codecs.MediaProcessor (in Aurigma.GraphicsMill.Codecs.MediaProcessor.dll)

Syntax

Visual Basic
Public Shared Function CreateFormatReader ( _
	filename As String _
) As IFormatReader
C#
public static IFormatReader CreateFormatReader(
	string filename
)

Parameters

filename

Type: System.String

Full path to the file to open.

Return Value

An object of the IFormatReader type.

Examples

This example shows how to create a reader.
Visual Basic
'Create a reader using the class factory
Private Sub CreateReader(ByVal fileName As String)
    Try
        reader = MediaFormatManager.CreateFormatReader(fileName)
    Catch ex As System.Exception
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, _
            MessageBoxIcon.Error)
    End Try
End Sub
C#
//Create a reader using the class factory
private void CreateReader(String fileName)
{
    try
    {
        reader = MediaFormatManager.CreateFormatReader(fileName);
    }
    catch(System.Exception ex)
    {
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
            MessageBoxIcon.Error);
    }

}

See Also

Reference