-api-id | -api-type |
---|---|
M:Windows.Storage.StorageFile.GetScaledImageAsThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode,System.UInt32) |
winrt method |
Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail and the requested size.
The enum value that describes the purpose of the thumbnail and determines how the thumbnail image is adjusted.
For guidance about choosing the best thumbnail mode, see Guidelines and checklist for thumbnails.
The requested size, in pixels, of the longest edge of the thumbnail. Windows uses the requestedSize as a guide and tries to scale the thumbnail image without reducing the quality of the image.
If Windows can't find a thumbnail image that it can scale to meet the requested size, a larger thumbnail might be returned. If no larger thumbnail is available, a thumbnail image that is smaller than the requested size might be returned.
When this method completes successfully, it returns a StorageItemThumbnail that represents the thumbnail image or null if there is no thumbnail image associated with the item.
While GetThumbnailAsync adheres to the max size supported by the thumbnail disk cache, GetScaledImageAsThumbnailAsync can extract thumbnails that are larger than what the thumbnail disk cache supports. GetScaledImageAsThumbnailAsync provides optimal quality but can affect performance by not using the disk cache if the thumbnail size is too large.
GetScaledImageAsThumbnailAsync(ThumbnailMode), GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions), GetThumbnailAsync(ThumbnailMode), GetThumbnailAsync(ThumbnailMode, UInt32), GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)