Share via


MediaComposition.GetThumbnailAsync Method

Definition

Asynchronously gets an image stream that represents a thumbnail of the media composition.

public:
 virtual IAsyncOperation<ImageStream ^> ^ GetThumbnailAsync(TimeSpan timeFromStart, int scaledWidth, int scaledHeight, VideoFramePrecision framePrecision) = GetThumbnailAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<ImageStream> GetThumbnailAsync(TimeSpan const& timeFromStart, int const& scaledWidth, int const& scaledHeight, VideoFramePrecision const& framePrecision);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<ImageStream> GetThumbnailAsync(System.TimeSpan timeFromStart, int scaledWidth, int scaledHeight, VideoFramePrecision framePrecision);
function getThumbnailAsync(timeFromStart, scaledWidth, scaledHeight, framePrecision)
Public Function GetThumbnailAsync (timeFromStart As TimeSpan, scaledWidth As Integer, scaledHeight As Integer, framePrecision As VideoFramePrecision) As IAsyncOperation(Of ImageStream)

Parameters

timeFromStart
TimeSpan TimeSpan

Specifies the point in the timeline of the MediaComposition from which to render the thumbnail, offset from the start of the MediaComposition.

scaledWidth
Int32

int

Specifies the target width at which to render. The default is 0. scaledWidth and/or scaledHeight can be optional; see Remarks.

scaledHeight
Int32

int

Specifies the target height at which to render. The default is 0. scaledWidth and/or scaledHeight can be optional; see Remarks.

framePrecision
VideoFramePrecision

Specifies the frame precision algorithm to use when retrieving the thumbnail.

Returns

An image stream representing resulting thumbnail.

Attributes

Remarks

If scaledWidth and scaledHeight are both set, the aspect ratio of the original MediaComposition is ignored, and your values can alter the aspect ratio.

If either scaledWidth or scaledHeight but not both is specified, the value you provide controls that dimension but the aspect ratio is preserved (the other dimension is calculated based on factoring the original aspect ratio of the MediaComposition).

Applies to