Contains information about a rectangular area
Name | Type | Description |
---|---|---|
bottom | integer | bottom Y-axis position |
left | integer | left X-axis position |
right | integer | right X-axis position |
top | integer | top Y-axis position |
For example, we want to take a frame from the video and cut it for 4 equal pieces.
int audioS;
M_AV_PROPS propsO;
pFrame.MFAVPropsGet(out propsO, out audioS);
int videoWidth = propsO.vidProps.nWidth;
int videoHeight = propsO.vidProps.nHeight;
MFORMATSLib.tagRECT screen1 = new MFORMATSLib.tagRECT();
screen1.bottom = videoHeight / 2;
screen1.left = 0;
screen1.right=videoWidth/2;
screen1.top = 0;
MFORMATSLib.tagRECT screen2= new MFORMATSLib.tagRECT();
screen2.bottom = videoHeight / 2;
screen2.left = videoWidth / 2;
screen2.right = videoWidth;
screen2.top = 0;
MFORMATSLib.tagRECT screen3 =new MFORMATSLib.tagRECT();
screen3.bottom = videoHeight;
screen3.left = 0;
screen3.right = videoWidth / 2;
screen3.top = videoHeight / 2;
MFORMATSLib.tagRECT screen4= new MFORMATSLib.tagRECT();
screen4.bottom = videoHeight; ;
screen4.left = videoWidth / 2;
screen4.right = videoWidth;
screen4.top = videoHeight / 2;
When we use these rectangles with the MFCut method we will get this result: