WmpBitmapDecoder Class
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Microsoft Windows Media Photo is a new codec that provides better image fidelity than JPEG with smaller file sizes and more features. Windows Media Photo images achieve lossy and lossless compression by using a single algorithm. Windows Media Photo images support existing metadata standards. For additional information about this format, see the Windows Media Ph.
The following code example demonstrates how to create an instance of and use a WmpBitmapDecoder.
' Open a Stream and decode a WDP image Dim imageStreamSource As New FileStream("tulipfarm.wdp", FileMode.Open, FileAccess.Read, FileShare.Read) Dim decoder As New WmpBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default) Dim bitmapSource As BitmapSource = decoder.Frames(0) ' Draw the Image Dim myImage As New Image() myImage.Source = bitmapSource myImage.Stretch = Stretch.None myImage.Margin = New Thickness(20)
System.Windows.Threading.DispatcherObject
System.Windows.Media.Imaging.BitmapDecoder
System.Windows.Media.Imaging.WmpBitmapDecoder
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.