stretchmode Attribute
[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.]
Note
[Deprecated. This API may be removed from future releases of Windows.]
The stretchmode
attribute specifies how to stretch an image that does not match the output dimensions.
Possible Values
Must have one of the following values.
- "stretch": The image is stretched to fit the output frame size without preserving aspect ratio. (Default)
- "crop": The image is cropped to fit the output frame size.
- "preserveaspectratio": The original aspect ratio is preserved, with a black letterbox along the shorter dimension.
- "preserveaspectrationoletterbox": The image is resized to fill the entire target frame while preserving the aspect ratio.
Applies To
See also