StorageFile.GetScaledImageAsThumbnailAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetScaledImageAsThumbnailAsync(ThumbnailMode) |
Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail. |
GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32) |
Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail and the requested size. |
GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions) |
Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail, the requested size, and the specified options |
GetScaledImageAsThumbnailAsync(ThumbnailMode)
Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail.
public:
virtual IAsyncOperation<StorageItemThumbnail ^> ^ GetScaledImageAsThumbnailAsync(ThumbnailMode mode) = GetScaledImageAsThumbnailAsync;
/// [Windows.Foundation.Metadata.Overload("GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageItemThumbnail> GetScaledImageAsThumbnailAsync(ThumbnailMode const& mode);
[Windows.Foundation.Metadata.Overload("GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageItemThumbnail> GetScaledImageAsThumbnailAsync(ThumbnailMode mode);
function getScaledImageAsThumbnailAsync(mode)
Public Function GetScaledImageAsThumbnailAsync (mode As ThumbnailMode) As IAsyncOperation(Of StorageItemThumbnail)
Parameters
- mode
- ThumbnailMode
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.
Returns
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.
Implements
- Attributes
Remarks
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.
See also
- GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32)
- GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)
- GetThumbnailAsync(ThumbnailMode)
- GetThumbnailAsync(ThumbnailMode, UInt32)
- GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)
Applies to
GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32)
Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail and the requested size.
public:
virtual IAsyncOperation<StorageItemThumbnail ^> ^ GetScaledImageAsThumbnailAsync(ThumbnailMode mode, unsigned int requestedSize) = GetScaledImageAsThumbnailAsync;
/// [Windows.Foundation.Metadata.Overload("GetScaledImageAsThumbnailAsyncOverloadDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageItemThumbnail> GetScaledImageAsThumbnailAsync(ThumbnailMode const& mode, uint32_t const& requestedSize);
[Windows.Foundation.Metadata.Overload("GetScaledImageAsThumbnailAsyncOverloadDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageItemThumbnail> GetScaledImageAsThumbnailAsync(ThumbnailMode mode, uint requestedSize);
function getScaledImageAsThumbnailAsync(mode, requestedSize)
Public Function GetScaledImageAsThumbnailAsync (mode As ThumbnailMode, requestedSize As UInteger) As IAsyncOperation(Of StorageItemThumbnail)
Parameters
- mode
- ThumbnailMode
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.
- requestedSize
-
UInt32
unsigned int
uint32_t
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.
Returns
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.
Implements
- Attributes
Remarks
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.
See also
- GetScaledImageAsThumbnailAsync(ThumbnailMode)
- GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)
- GetThumbnailAsync(ThumbnailMode)
- GetThumbnailAsync(ThumbnailMode, UInt32)
- GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)
Applies to
GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)
Gets a scaled image as a thumbnail, determined by the purpose of the thumbnail, the requested size, and the specified options
public:
virtual IAsyncOperation<StorageItemThumbnail ^> ^ GetScaledImageAsThumbnailAsync(ThumbnailMode mode, unsigned int requestedSize, ThumbnailOptions options) = GetScaledImageAsThumbnailAsync;
/// [Windows.Foundation.Metadata.Overload("GetScaledImageAsThumbnailAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageItemThumbnail> GetScaledImageAsThumbnailAsync(ThumbnailMode const& mode, uint32_t const& requestedSize, ThumbnailOptions const& options);
[Windows.Foundation.Metadata.Overload("GetScaledImageAsThumbnailAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageItemThumbnail> GetScaledImageAsThumbnailAsync(ThumbnailMode mode, uint requestedSize, ThumbnailOptions options);
function getScaledImageAsThumbnailAsync(mode, requestedSize, options)
Public Function GetScaledImageAsThumbnailAsync (mode As ThumbnailMode, requestedSize As UInteger, options As ThumbnailOptions) As IAsyncOperation(Of StorageItemThumbnail)
Parameters
- mode
- ThumbnailMode
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.
- requestedSize
-
UInt32
unsigned int
uint32_t
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.
- options
- ThumbnailOptions
The enum value that describes the desired behavior to use to retrieve the thumbnail image. The specified behavior might affect the size and/or quality of the image and how quickly the thumbnail image is retrieved.
Returns
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.
Implements
- Attributes
Remarks
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.
See also
- GetScaledImageAsThumbnailAsync(ThumbnailMode)
- GetScaledImageAsThumbnailAsync(ThumbnailMode, UInt32)
- GetThumbnailAsync(ThumbnailMode)
- GetThumbnailAsync(ThumbnailMode, UInt32)
- GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)