MFORMATSDSLib Namespace > IMFFrame Interface : MFCut Method |
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 )
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");