Resize Flags

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

[Deprecated. This API may be removed from future releases of Windows.]

These flags specify how a video source is rendered if its size does not match the output dimensions.

Constant/value Description
RESIZEF_STRETCH
0
The image is stretched to fit the target frame size in both dimensions, without preserving the aspect ratio.
RESIZEF_CROP
1
The image is not resized. If the image is smaller than the target frame, the surrounding area is black. If the image is larger than the target frame, the image is cropped.
RESIZEF_PRESERVEASPECTRATIO
2
The image is resized to fit the target frame along one dimension, while preserving the aspect ratio. If the ratio of width to height in the image does not match the ratio in the target frame, it creates a letterbox.
RESIZEF_PRESERVEASPECTRATIO_NOLETTERBOX
3
The image is resized to fill the entire target frame while preserving the aspect ratio. Rather than create a letterbox, this mode crops the image, either along the sides or across the top and bottom.

Remarks

The following images show the effects of these flags.

resize flags

Requirements

Requirement Value
Header
Qedit.h

See also

IAMTimelineSrc::GetStretchMode

IAMTimelineSrc::SetStretchMode