WpfConverter Class |
Namespace: Atalasoft.Imaging.Wpf
The WpfConverter type exposes the following members.
Name | Description | |
---|---|---|
AtalaImageToBitmapSource | Converts an AtalaImage to a BitmapSource. | |
AtalaToWpfPixelFormat | Converts an Atalasoft.Imaging.PixelFormat to a
System.Windows.Media.PixelFormat equivalent. | |
BitmapSourceToAtalaImage | Converts a BitmapSource to an AtalaImage. | |
WpfToAtalaPixelFormat | Converts an System.Windows.Media.PixelFormat to a
Atalasoft.Imaging.PixelFormat equivalent. |
Dim dlg As Microsoft.Win32.OpenFileDialog = New Microsoft.Win32.OpenFileDialog()
dlg.Filter = "Images|*.jpg;*.png;*.tif;*.gif;*.bmp;*.wdp;*.xps"
If dlg.ShowDialog(Me).Value Then
Dim image As Atalasoft.Imaging.AtalaImage = New Atalasoft.Imaging.AtalaImage(dlg.FileName)
Dim source As BitmapSource = WpfConverter.AtalaImageToBitmapSource(image)
image.Dispose()
Me.Viewer.Source = source
End If
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.Filter = "Images|*.jpg;*.png;*.tif;*.gif;*.bmp;*.wdp;*.xps"; if (dlg.ShowDialog(this).Value) { Atalasoft.Imaging.AtalaImage image = new Atalasoft.Imaging.AtalaImage(dlg.FileName); BitmapSource source = WpfConverter.AtalaImageToBitmapSource(image); image.Dispose(); this.Viewer.Source = source; }