BitmapDecoder::Create Method (Uri, BitmapCreateOptions, BitmapCacheOption)

Creates a BitmapDecoder from a Uri by using the specified BitmapCreateOptions and BitmapCacheOption.

Namespace:  System.Windows.Media.Imaging
Assembly:  PresentationCore (in PresentationCore.dll)

public:
static BitmapDecoder^ Create(
	Uri^ bitmapUri, 
	BitmapCreateOptions createOptions, 
	BitmapCacheOption cacheOption
)
You cannot use methods in XAML.

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.

ExceptionCondition
ArgumentNullException

The bitmapUri is nullptr.

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.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft