MFCut Method (IMFFrame)
number of a field to cut (0 means both fields, 1 means the first field, 2 means the second one)
rectangle for cutting
result frame object
Cuts out part of video frame without memory copy. nFeild <= 0->both, nField=1 -> first field, nField=2 -> second field
Syntax
Sub MFCut( _
   ByVal _nField As Integer, _
   ByRef _pRect As tagRECT, _
   ByRef _ppFrameRes As IMFFrame _
) 
void MFCut( 
   int _nField,
   ref tagRECT _pRect,
   out IMFFrame _ppFrameRes
)
procedure MFCut( 
    _nField: Integer;
   var  _pRect: tagRECT;
   Out  _ppFrameRes: IMFFrame
); 
void MFCut( 
   int _nField,
   ref tagRECT _pRect,
   [PARAMFLAG::Out] IMFFrame* _ppFrameRes
) 

Parameters

_nField
number of a field to cut (0 means both fields, 1 means the first field, 2 means the second one)
_pRect
rectangle for cutting
_ppFrameRes
result frame object
Example

Here is example of how to cut a part of a source frame and save it into file:

MFFrame pFrame = null;
try
{
    m_objLive.SourceFrameConvertedGet(ref m_avProps, -1, out pFrame, "");
}
catch
{
}
tagRECT rect = new tagRECT {bottom = 200, left = 150, right = 250, top = 100};
MFFrame cutFrame;
pFrame.MFCut(0, ref rect, out cutFrame);
cutFrame.MFVideoSaveToFile(@"c:\cutTest.png");
See Also

Reference

IMFFrame Interface
IMFFrame Members