本文整理匯總了VB.NET中System.Windows.Media.Imaging.JpegBitmapDecoder.JpegBitmapDecoder構造函數的典型用法代碼示例。如果您正苦於以下問題:VB.NET JpegBitmapDecoder構造函數的具體用法?VB.NET JpegBitmapDecoder怎麽用?VB.NET JpegBitmapDecoder使用的例子?那麽, 這裏精選的構造函數代碼示例或許可以為您提供幫助。
在下文中一共展示了JpegBitmapDecoder構造函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: FileStream
' Open a Stream and decode a JPEG image
Dim imageStreamSource As New FileStream("tulipfarm.jpg", FileMode.Open, FileAccess.Read, FileShare.Read)
Dim decoder As New JpegBitmapDecoder(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 JPEG image
Dim myUri As New Uri("tulipfarm.jpg", UriKind.RelativeOrAbsolute)
Dim decoder2 As New JpegBitmapDecoder(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)