BitmapDecoder::Create Method (Uri^, BitmapCreateOptions, BitmapCacheOption)
.NET Framework (current version)
Creates a BitmapDecoder from a Uri by using the specified BitmapCreateOptions and BitmapCacheOption.
Assembly: PresentationCore (in PresentationCore.dll)
public: static BitmapDecoder^ Create( Uri^ bitmapUri, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption )
Parameters
- bitmapUri
-
Type:
System::Uri^
The Uri of the bitmap to decode.
- createOptions
-
Type:
System.Windows.Media.Imaging::BitmapCreateOptions
Identifies the BitmapCreateOptions for this decoder.
- cacheOption
-
Type:
System.Windows.Media.Imaging::BitmapCacheOption
Identifies the BitmapCacheOption for this decoder.
Return Value
Type: System.Windows.Media.Imaging::BitmapDecoder^A BitmapDecoder from a Uri by using the specified BitmapCreateOptions and BitmapCacheOption.
| Exception | Condition |
|---|---|
| ArgumentNullException | The bitmapUri is null. |
| FileFormatException | The bitmapUri specifies a class ID of an unsupported format type. |
The following example demonstrates how to use the Create(Uri^, BitmapCreateOptions, BitmapCacheOption) method to create a decoder for a given image. The first BitmapFrame of the image is used as the source of an Image control.
.NET Framework
Available since 3.0
Available since 3.0
Show: