MFFrameCreateFromFile Method (IMFFactory)
path to source file (JPEG, PNG, BMP or TIFF image)
result frame
additional properties
Creates a frame from a file
Syntax
Sub MFFrameCreateFromFile( _
   ByVal _bsFileName As String, _
   ByRef _ppFrame As MFFrame, _
   ByVal _bsPropsList As String _
) 
void MFFrameCreateFromFile( 
   string _bsFileName,
   out MFFrame _ppFrame,
   string _bsPropsList
)
procedure MFFrameCreateFromFile( 
    _bsFileName: String;
   Out  _ppFrame: MFFrame;
    _bsPropsList: String
); 
void MFFrameCreateFromFile( 
   BSTR* _bsFileName,
   [PARAMFLAG::Out] MFFrame* _ppFrame,
   BSTR* _bsPropsList
) 

Parameters

_bsFileName
path to source file (JPEG, PNG, BMP or TIFF image)
_ppFrame
result frame
_bsPropsList
additional properties
Example

Here is an example of how to create a frame from file and sent it to a preview:

m_objPreview = new MFPreviewClass();
//Configure preview
m_objPreview.PreviewWindowSet("", panelPreview.Handle.ToInt32());
m_objPreview.PreviewEnable("", 1, 1);
MFFactoryClass factory = new MFFactoryClass();
MFFrame frame;
factory.MFFrameCreateFromFile(pathToFile, out frame, "");
m_objPreview.ReceiverFramePut(frame, -1, "");
See Also

Reference

IMFFactory Interface
IMFFactory Members