本文整理汇总了VB.NET中System.Windows.Media.Imaging.BmpBitmapDecoder.BmpBitmapDecoder构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET BmpBitmapDecoder构造函数的具体用法?VB.NET BmpBitmapDecoder怎么用?VB.NET BmpBitmapDecoder使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。
在下文中一共展示了BmpBitmapDecoder构造函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: FileStream
' Open a Stream and decode a BMP image
Dim imageStreamSource As New FileStream("tulipfarm.bmp", FileMode.Open, FileAccess.Read, FileShare.Read)
Dim decoder As New BmpBitmapDecoder(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)
示例2: Uri
' Open a Uri and decode a BMP image
Dim myUri As New Uri("tulipfarm.bmp", UriKind.RelativeOrAbsolute)
Dim decoder2 As New BmpBitmapDecoder(myUri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default)
Dim bitmapSource2 As BitmapSource = decoder2.Frames(0)
' Draw the Image
Dim myImage2 As New Image()
myImage2.Source = bitmapSource2
myImage2.Stretch = Stretch.None
myImage2.Margin = New Thickness(20)