BitmapDecoder BitmapDecoder BitmapDecoder BitmapDecoder Class

Provides read access to bitmap container data as well as data from the first frame.

Syntax

Declaration

public sealed class BitmapDecoderpublic sealed class BitmapDecoderPublic NotInheritable Class BitmapDecoder

Remarks

Image formats

BitmapDecoder can decode the following formats.

  • JPEG
  • PNG
  • GIF
  • TIFF
  • BMP
  • ICO
  • JPEG-XR
  • Any installed Camera raw formats by using the Microsoft Camera Codec Pack. For a list of decoding formats, see the BitmapEncoder topic.

The BitmapDecoder class implements IBitmapFrame. It provides access to container data as well as data from the first frame. This allows applications to accomplish most common scenarios without needing to retrieve a separate BitmapFrame.

Examples

Here's a partial example of creating a decoder object. This example assumes you selected a file with FileOpenPicker. For full instructions on selecting a file, creating an decoder, and decoding an image see Imaging

file.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function (_stream) {
        stream = _stream;

        var encoderId;
        switch (fileType) {
            case ".jpg":
                encoderId = Windows.Graphics.Imaging.BitmapEncoder.jpegEncoderId;
                break;
        }
        return Windows.Graphics.Imaging.BitmapEncoder.createAsync(encoderId, stream);
        }).then(function (encoder) {

              // Your code here.
        }

Properties summary

The default alpha mode of the first frame.

Provides access to the container bitmap properties.

The pixel format that best fits the first frame.

A read-only view of the metadata within the first frame.

The unique identifier of the BMP decoder.

Information about the bitmap decoder.

The horizontal resolution of the first frame in dots per inch.

The vertical resolution of the first frame in dots per inch.

The number of frames within the image file.

The unique identifier of the GIF decoder.

The unique identifier of the ICO decoder.

The unique identifier of the JPEG decoder.

The unique identifier of the JPEG-XR decoder.

The height of the first frame in pixels, after any EXIF orientation has been applied to the bitmap.

The width of the first frame in pixels, after any EXIF orientation has been applied to the bitmap.

The height of the first frame in pixels.

The width of the first frame in pixels.

The unique identifier of the PNG decoder.

The unique identifier of the TIFF decoder.

Methods summary

Asynchronously creates a new BitmapDecoder using a specific bitmap codec and initializes it using a stream.

Asynchronously creates a new BitmapDecoder and initializes it using a stream.

The bitmap decoders installed on the system and information about them.

Asynchronously retrieves a frame from the image file.

Asynchronously requests the pixel data for the frame.

Asynchronously requests the pixel data for the frame using the specified parameters.

Asynchronously returns a stream containing the preview image.

Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.

Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.

Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.

Asynchronously returns a stream containing the thumbnail image.

Properties

  • BitmapAlphaMode
    BitmapAlphaMode
    BitmapAlphaMode
    BitmapAlphaMode

    The default alpha mode of the first frame.

    public BitmapAlphaMode BitmapAlphaMode { get; }public BitmapAlphaMode BitmapAlphaMode { get; }Public ReadOnly Property BitmapAlphaMode As BitmapAlphaMode

    Property Value

    Remarks

    This is the alpha mode used when calling the GetPixelDataAsync() method.

  • BitmapContainerProperties
    BitmapContainerProperties
    BitmapContainerProperties
    BitmapContainerProperties

    Provides access to the container bitmap properties.

    public BitmapPropertiesView BitmapContainerProperties { get; }public BitmapPropertiesView BitmapContainerProperties { get; }Public ReadOnly Property BitmapContainerProperties As BitmapPropertiesView

    Property Value

    Remarks

    Many image file formats do not have container level metadata.

  • BitmapPixelFormat
    BitmapPixelFormat
    BitmapPixelFormat
    BitmapPixelFormat

    The pixel format that best fits the first frame.

    public BitmapPixelFormat BitmapPixelFormat { get; }public BitmapPixelFormat BitmapPixelFormat { get; }Public ReadOnly Property BitmapPixelFormat As BitmapPixelFormat

    Property Value

    Remarks

    This is the pixel format used when calling the GetPixelDataAsync() method.

  • BitmapProperties
    BitmapProperties
    BitmapProperties
    BitmapProperties

    A read-only view of the metadata within the first frame.

    public BitmapPropertiesView BitmapProperties { get; }public BitmapPropertiesView BitmapProperties { get; }Public ReadOnly Property BitmapProperties As BitmapPropertiesView

    Property Value

  • BmpDecoderId
    BmpDecoderId
    BmpDecoderId
    BmpDecoderId

    The unique identifier of the BMP decoder.

    public static Guid BmpDecoderId { get; }public static Guid BmpDecoderId { get; }Public Static ReadOnly Property BmpDecoderId As Guid

    Property Value

    • System.Guid
      System.Guid
      System.Guid
      System.Guid

      The unique identifier of the BMP decoder.

  • DecoderInformation
    DecoderInformation
    DecoderInformation
    DecoderInformation

    Information about the bitmap decoder.

    public BitmapCodecInformation DecoderInformation { get; }public BitmapCodecInformation DecoderInformation { get; }Public ReadOnly Property DecoderInformation As BitmapCodecInformation

    Property Value

  • DpiX
    DpiX
    DpiX
    DpiX

    The horizontal resolution of the first frame in dots per inch.

    public double DpiX { get; }public double DpiX { get; }Public ReadOnly Property DpiX As double

    Property Value

    • double
      double
      double
      double

      The horizontal resolution of the first frame in dots per inch.

  • DpiY
    DpiY
    DpiY
    DpiY

    The vertical resolution of the first frame in dots per inch.

    public double DpiY { get; }public double DpiY { get; }Public ReadOnly Property DpiY As double

    Property Value

    • double
      double
      double
      double

      The vertical resolution of the first frame in dots per inch.

  • FrameCount
    FrameCount
    FrameCount
    FrameCount

    The number of frames within the image file.

    public uint FrameCount { get; }public uint FrameCount { get; }Public ReadOnly Property FrameCount As uint

    Property Value

    • uint
      uint
      uint
      uint

      The number of frames.

  • GifDecoderId
    GifDecoderId
    GifDecoderId
    GifDecoderId

    The unique identifier of the GIF decoder.

    public static Guid GifDecoderId { get; }public static Guid GifDecoderId { get; }Public Static ReadOnly Property GifDecoderId As Guid

    Property Value

    • System.Guid
      System.Guid
      System.Guid
      System.Guid

      The unique identifier of the GIF decoder.

  • IcoDecoderId
    IcoDecoderId
    IcoDecoderId
    IcoDecoderId

    The unique identifier of the ICO decoder.

    public static Guid IcoDecoderId { get; }public static Guid IcoDecoderId { get; }Public Static ReadOnly Property IcoDecoderId As Guid

    Property Value

    • System.Guid
      System.Guid
      System.Guid
      System.Guid

      The unique identifier of the ICO decoder.

  • JpegDecoderId
    JpegDecoderId
    JpegDecoderId
    JpegDecoderId

    The unique identifier of the JPEG decoder.

    public static Guid JpegDecoderId { get; }public static Guid JpegDecoderId { get; }Public Static ReadOnly Property JpegDecoderId As Guid

    Property Value

    • System.Guid
      System.Guid
      System.Guid
      System.Guid

      The unique identifier of the JPEG decoder.

  • JpegXRDecoderId
    JpegXRDecoderId
    JpegXRDecoderId
    JpegXRDecoderId

    The unique identifier of the JPEG-XR decoder.

    public static Guid JpegXRDecoderId { get; }public static Guid JpegXRDecoderId { get; }Public Static ReadOnly Property JpegXRDecoderId As Guid

    Property Value

    • System.Guid
      System.Guid
      System.Guid
      System.Guid

      The unique identifier of the JPEG-XR decoder.

  • OrientedPixelHeight
    OrientedPixelHeight
    OrientedPixelHeight
    OrientedPixelHeight

    The height of the first frame in pixels, after any EXIF orientation has been applied to the bitmap.

    public uint OrientedPixelHeight { get; }public uint OrientedPixelHeight { get; }Public ReadOnly Property OrientedPixelHeight As uint

    Property Value

    • uint
      uint
      uint
      uint

      The height of the first frame in pixels, after any EXIF orientation has been applied.

    Remarks

    Use this property if you need to know the height of an image or of pixel data that has EXIF orientation applied, for example, if you call GetPixelDataAsync() and specify RespectExifOrientation. Also, the HTML img element in Windows app using JavaScript, and Image respect EXIF orientation.

    If you need pixel dimensions of the image as it is natively stored, use the PixelHeight property.

  • OrientedPixelWidth
    OrientedPixelWidth
    OrientedPixelWidth
    OrientedPixelWidth

    The width of the first frame in pixels, after any EXIF orientation has been applied to the bitmap.

    public uint OrientedPixelWidth { get; }public uint OrientedPixelWidth { get; }Public ReadOnly Property OrientedPixelWidth As uint

    Property Value

    • uint
      uint
      uint
      uint

      The width of the first frame in pixels, after any EXIF orientation has been applied.

    Remarks

    Use this property in the same way as OrientedPixelHeight is used if you need to know the width of an image or of pixel data.

  • PixelHeight
    PixelHeight
    PixelHeight
    PixelHeight

    The height of the first frame in pixels.

    public uint PixelHeight { get; }public uint PixelHeight { get; }Public ReadOnly Property PixelHeight As uint

    Property Value

    • uint
      uint
      uint
      uint

      The height of the first frame in pixels.

    Remarks

    Use PixelHeight for pixel dimensions of the image as it is natively stored.

  • PixelWidth
    PixelWidth
    PixelWidth
    PixelWidth

    The width of the first frame in pixels.

    public uint PixelWidth { get; }public uint PixelWidth { get; }Public ReadOnly Property PixelWidth As uint

    Property Value

    • uint
      uint
      uint
      uint

      The width of the first frame in pixels.

    Remarks

    Use PixelWidth for pixel dimensions of the image as it is natively stored.

  • PngDecoderId
    PngDecoderId
    PngDecoderId
    PngDecoderId

    The unique identifier of the PNG decoder.

    public static Guid PngDecoderId { get; }public static Guid PngDecoderId { get; }Public Static ReadOnly Property PngDecoderId As Guid

    Property Value

    • System.Guid
      System.Guid
      System.Guid
      System.Guid

      The unique identifier of the PNG decoder.

  • TiffDecoderId
    TiffDecoderId
    TiffDecoderId
    TiffDecoderId

    The unique identifier of the TIFF decoder.

    public static Guid TiffDecoderId { get; }public static Guid TiffDecoderId { get; }Public Static ReadOnly Property TiffDecoderId As Guid

    Property Value

    • System.Guid
      System.Guid
      System.Guid
      System.Guid

      The unique identifier of the TIFF decoder.

Methods

  • CreateAsync(System.Guid,Windows.Storage.Streams.IRandomAccessStream)
    CreateAsync(System.Guid,Windows.Storage.Streams.IRandomAccessStream)
    CreateAsync(System.Guid,Windows.Storage.Streams.IRandomAccessStream)
    CreateAsync(System.Guid,Windows.Storage.Streams.IRandomAccessStream)

    Asynchronously creates a new BitmapDecoder using a specific bitmap codec and initializes it using a stream.

    public static IAsyncOperation<BitmapDecoder> CreateAsync(System.Guid decoderId,Windows.Storage.Streams.IRandomAccessStream stream)public static IAsyncOperation<BitmapDecoder> CreateAsync(System.Guid decoderId,Windows.Storage.Streams.IRandomAccessStream stream)Public Static Function CreateAsync(decoderId As System.Guid,stream As Windows.Storage.Streams.IRandomAccessStream) As IAsyncOperation( Of BitmapDecoder )

    Parameters

    Returns

    • An object that manages the asynchronous creation of a new BitmapDecoder.

    Remarks

    This method allows the application to explicitly select the bitmap decoder to be used and bypass any automatic codec arbitration. The unique identifiers of the built-in decoders are available as properties on BitmapDecoder. In addition, the unique identifier of any installed decoder can be obtained using the GetDecoderInformationEnumerator() method.

  • CreateAsync(Windows.Storage.Streams.IRandomAccessStream)
    CreateAsync(Windows.Storage.Streams.IRandomAccessStream)
    CreateAsync(Windows.Storage.Streams.IRandomAccessStream)
    CreateAsync(Windows.Storage.Streams.IRandomAccessStream)

    Asynchronously creates a new BitmapDecoder and initializes it using a stream.

    public static IAsyncOperation<BitmapDecoder> CreateAsync(Windows.Storage.Streams.IRandomAccessStream stream)public static IAsyncOperation<BitmapDecoder> CreateAsync(Windows.Storage.Streams.IRandomAccessStream stream)Public Static Function CreateAsync(stream As Windows.Storage.Streams.IRandomAccessStream) As IAsyncOperation( Of BitmapDecoder )

    Parameters

    Returns

    • An object that manages the asynchronous creation of a new BitmapDecoder.

    Remarks

    Windows.Graphics.Imaging automatically determines the correct bitmap decoder to decode the stream.

  • GetDecoderInformationEnumerator()
    GetDecoderInformationEnumerator()
    GetDecoderInformationEnumerator()
    GetDecoderInformationEnumerator()

    The bitmap decoders installed on the system and information about them.

    public static IVectorView<BitmapCodecInformation> GetDecoderInformationEnumerator()public static IVectorView<BitmapCodecInformation> GetDecoderInformationEnumerator()Public Static Function GetDecoderInformationEnumerator() As IVectorView( Of BitmapCodecInformation )

    Returns

  • GetFrameAsync(System.UInt32)
    GetFrameAsync(System.UInt32)
    GetFrameAsync(System.UInt32)
    GetFrameAsync(System.UInt32)

    Asynchronously retrieves a frame from the image file.

    public IAsyncOperation<BitmapFrame> GetFrameAsync(System.UInt32 frameIndex)public IAsyncOperation<BitmapFrame> GetFrameAsync(System.UInt32 frameIndex)Public Function GetFrameAsync(frameIndex As System.UInt32) As IAsyncOperation( Of BitmapFrame )

    Parameters

    • frameIndex
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The zero-based index of the frame to be retrieved.

    Returns

    • Object that manages the asynchronous retrieval of the frame.

    Remarks

    You don't need to use this method to access data from the first frame in an image file. BitmapDecoder already provides a method to access the first frame.

    You can get the total number of frames on the image using the FrameCount property.

  • GetPixelDataAsync()
    GetPixelDataAsync()
    GetPixelDataAsync()
    GetPixelDataAsync()

    Asynchronously requests the pixel data for the frame.

    public IAsyncOperation<PixelDataProvider> GetPixelDataAsync()public IAsyncOperation<PixelDataProvider> GetPixelDataAsync()Public Function GetPixelDataAsync() As IAsyncOperation( Of PixelDataProvider )

    Returns

    • Object that manages the asynchronous retrieval of the pixel data.

    Remarks

    The pixel data array will use the bitmap pixel format and alpha mode specified in the BitmapPixelFormat and BitmapAlphaMode properties. It will also have color management and EXIF orientation applied.

    An application should not assume that pixel data returned by this method uses any particular pixel format or alpha mode (like Rgba8 with premultiplied alpha). Instead, it should always check the BitmapPixelFormat and BitmapAlphaMode properties and handle the data accordingly.

    As a convenience, this method performs color management from the frame’s embedded color space (if it exists) to the sRGB color space. If there is no embedded color profile data, then no color management is performed. This method also attempts to read the EXIF orientation flag on the frame, and if it exists, will perform the necessary transformation to correctly orient the pixel data.

    In order to retrieve the correct bitmap pixel width and height, the application should read the OrientedPixelWidth and OrientedPixelHeight properties, instead of the PixelWidth and PixelHeight properties.

    This method is equivalent to calling the GetPixelDataAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode) method with the following arguments:

    ArgumentValue
    pixelFormatThe value of the BitmapPixelFormat property.
    alphaModeThe value of the BitmapAlphaMode property
    transformA new @Windows.Graphics.Imaging.BitmapTransform.</td></tr>
    exifOrientationModeThe ExifOrientationMode value RespectExifOrientation.
    colorManagementModeThe ColorManagementMode value ColorManageToSRgb.

  • GetPixelDataAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)
    GetPixelDataAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)
    GetPixelDataAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)
    GetPixelDataAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)

    Asynchronously requests the pixel data for the frame using the specified parameters.

    public IAsyncOperation<PixelDataProvider> GetPixelDataAsync(Windows.Graphics.Imaging.BitmapPixelFormat pixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode alphaMode,Windows.Graphics.Imaging.BitmapTransform transform,Windows.Graphics.Imaging.ExifOrientationMode exifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode colorManagementMode)public IAsyncOperation<PixelDataProvider> GetPixelDataAsync(Windows.Graphics.Imaging.BitmapPixelFormat pixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode alphaMode,Windows.Graphics.Imaging.BitmapTransform transform,Windows.Graphics.Imaging.ExifOrientationMode exifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode colorManagementMode)Public Function GetPixelDataAsync(pixelFormat As Windows.Graphics.Imaging.BitmapPixelFormat,alphaMode As Windows.Graphics.Imaging.BitmapAlphaMode,transform As Windows.Graphics.Imaging.BitmapTransform,exifOrientationMode As Windows.Graphics.Imaging.ExifOrientationMode,colorManagementMode As Windows.Graphics.Imaging.ColorManagementMode) As IAsyncOperation( Of PixelDataProvider )

    Parameters

    Returns

    • Object that manages the asynchronous retrieval of the pixel data.

    Remarks

    This method should be used instead of GetPixelDataAsync() if the application needs finer grained control over the pixel data array.

  • GetPreviewAsync()
    GetPreviewAsync()
    GetPreviewAsync()
    GetPreviewAsync()

    Asynchronously returns a stream containing the preview image.

    public IAsyncOperation<ImageStream> GetPreviewAsync()public IAsyncOperation<ImageStream> GetPreviewAsync()Public Function GetPreviewAsync() As IAsyncOperation( Of ImageStream )

    Returns

    • Object that manages the asynchronous retrieval of the bitmap preview data.

      The preview data is returned in the form of an image stream. You can display it using an image control, or read and edit it using BitmapDecoder and BitmapEncoder.

    Remarks

    Some image formats, like JPEG-XR and camera RAW formats, contain an image preview. The preview is generally higher resolution than a thumbnail. This is an advantage because decoding the preview can be faster than decoding the full RAW image, but provides comparable fidelity when displaying images

    If the image does not contain a preview, this operation fails with HRESULT WINCODEC_ERR_UNSUPPORTEDOPERATION.

  • GetSoftwareBitmapAsync()
    GetSoftwareBitmapAsync()
    GetSoftwareBitmapAsync()
    GetSoftwareBitmapAsync()

    Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.

    public IAsyncOperation<SoftwareBitmap> GetSoftwareBitmapAsync()public IAsyncOperation<SoftwareBitmap> GetSoftwareBitmapAsync()Public Function GetSoftwareBitmapAsync() As IAsyncOperation( Of SoftwareBitmap )

    Returns

    • An asynchronous operation that returns a SoftwareBitmap on successful completion.

  • GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode)
    GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode)
    GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode)
    GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode)

    Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.

    public IAsyncOperation<SoftwareBitmap> GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat pixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode alphaMode)public IAsyncOperation<SoftwareBitmap> GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat pixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode alphaMode)Public Function GetSoftwareBitmapAsync(pixelFormat As Windows.Graphics.Imaging.BitmapPixelFormat,alphaMode As Windows.Graphics.Imaging.BitmapAlphaMode) As IAsyncOperation( Of SoftwareBitmap )

    Parameters

    Returns

    • An asynchronous operation that returns a SoftwareBitmap on successful completion.

  • GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)
    GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)
    GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)
    GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,Windows.Graphics.Imaging.BitmapTransform,Windows.Graphics.Imaging.ExifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode)

    Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.

    public IAsyncOperation<SoftwareBitmap> GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat pixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode alphaMode,Windows.Graphics.Imaging.BitmapTransform transform,Windows.Graphics.Imaging.ExifOrientationMode exifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode colorManagementMode)public IAsyncOperation<SoftwareBitmap> GetSoftwareBitmapAsync(Windows.Graphics.Imaging.BitmapPixelFormat pixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode alphaMode,Windows.Graphics.Imaging.BitmapTransform transform,Windows.Graphics.Imaging.ExifOrientationMode exifOrientationMode,Windows.Graphics.Imaging.ColorManagementMode colorManagementMode)Public Function GetSoftwareBitmapAsync(pixelFormat As Windows.Graphics.Imaging.BitmapPixelFormat,alphaMode As Windows.Graphics.Imaging.BitmapAlphaMode,transform As Windows.Graphics.Imaging.BitmapTransform,exifOrientationMode As Windows.Graphics.Imaging.ExifOrientationMode,colorManagementMode As Windows.Graphics.Imaging.ColorManagementMode) As IAsyncOperation( Of SoftwareBitmap )

    Parameters

    Returns

    • An asynchronous operation that returns a SoftwareBitmap on successful completion.

  • GetThumbnailAsync()
    GetThumbnailAsync()
    GetThumbnailAsync()
    GetThumbnailAsync()

    Asynchronously returns a stream containing the thumbnail image.

    public IAsyncOperation<ImageStream> GetThumbnailAsync()public IAsyncOperation<ImageStream> GetThumbnailAsync()Public Function GetThumbnailAsync() As IAsyncOperation( Of ImageStream )

    Returns

    • Object that manages the asynchronous retrieval of the thumbnail stream.

      The thumbnail data is returned in the form of an image stream. You can display it using an image control, or read and edit it using BitmapDecoder and BitmapEncoder

    Remarks

    Many image formats, like JPEG and TIFF, allow a small sized thumbnail of the full image to be embedded within a frame. If the image does not contain a thumbnail, then this operation will fail with HRESULT WINCODEC_ERR_CODECNOTHUMBNAIL. If it exists, the EXIF orientation flag on the frame is automatically applied to the thumbnail before it is returned.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Graphics.Imaging.dll