BitmapDecoder
BitmapDecoder
BitmapDecoder
BitmapDecoder
BitmapDecoder
Class
Definition
Provides read access to bitmap container data as well as data from the first frame.
In this article
public : sealed class BitmapDecoder : IBitmapFrame, IBitmapFrameWithSoftwareBitmap
struct winrt::Windows::Graphics::Imaging::BitmapDecoder : IBitmapFrame, IBitmapFrameWithSoftwareBitmap
public sealed class BitmapDecoder : IBitmapFrame, IBitmapFrameWithSoftwareBitmap
Public NotInheritable Class BitmapDecoder Implements IBitmapFrame, IBitmapFrameWithSoftwareBitmap
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Examples
Here's a partial example of creating a decoder object. This example assumes you selected a file with Windows.Storage.Pickers.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;
return Windows.Graphics.Imaging.BitmapDecoder.createAsync(stream);
}).then(function(decoder) {
// Your code here.
});
Remarks
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 .
Version history
Windows version
SDK version
Value added
1809
17763
HeifDecoderId
1809
17763
WebpDecoderId
Properties
Methods
CreateAsync(Guid, IRandomAccessStream)
CreateAsync(Guid, IRandomAccessStream)
CreateAsync(Guid, IRandomAccessStream)
CreateAsync(Guid, IRandomAccessStream)
CreateAsync(Guid, IRandomAccessStream)
Asynchronously creates a new BitmapDecoder using a specific bitmap codec and initializes it using a stream.
CreateAsync(IRandomAccessStream)
CreateAsync(IRandomAccessStream)
CreateAsync(IRandomAccessStream)
CreateAsync(IRandomAccessStream)
CreateAsync(IRandomAccessStream)
Asynchronously creates a new BitmapDecoder and initializes it using a stream.
GetDecoderInformationEnumerator()
GetDecoderInformationEnumerator()
GetDecoderInformationEnumerator()
GetDecoderInformationEnumerator()
GetDecoderInformationEnumerator()
The bitmap decoders installed on the system and information about them.
GetFrameAsync(UInt32)
GetFrameAsync(UInt32)
GetFrameAsync(UInt32)
GetFrameAsync(UInt32)
GetFrameAsync(UInt32)
Asynchronously retrieves a frame from the image file.
GetPixelDataAsync()
GetPixelDataAsync()
GetPixelDataAsync()
GetPixelDataAsync()
GetPixelDataAsync()
Asynchronously requests the pixel data for the frame.
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
Asynchronously requests the pixel data for the frame using the specified parameters.
GetPreviewAsync()
GetPreviewAsync()
GetPreviewAsync()
GetPreviewAsync()
GetPreviewAsync()
Asynchronously returns a stream containing the preview image.
GetSoftwareBitmapAsync()
GetSoftwareBitmapAsync()
GetSoftwareBitmapAsync()
GetSoftwareBitmapAsync()
GetSoftwareBitmapAsync()
Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode)
Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetSoftwareBitmapAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
Asynchronously gets a SoftwareBitmap representation of the decoded bitmap.
GetThumbnailAsync()
GetThumbnailAsync()
GetThumbnailAsync()
GetThumbnailAsync()
GetThumbnailAsync()
Asynchronously returns a stream containing the thumbnail image.
See also