Click here to Skip to main content
15,882,209 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In WPF image control loaded tif file,its quality is very low how to improve the display tif image with quality
private void RibbonButton_Click(object sender, RoutedEventArgs e)
          Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
          dlg.InitialDirectory = "c:\\";
          dlg.Filter = "Image files (*.tif)|*.tif|All Files (*.*)|*.*";
          dlg.RestoreDirectory = true;
          bool? result = dlg.ShowDialog();
              string selectedFileName = dlg.FileName;
              FileNameLabel.Content = selectedFileName;
              BitmapImage bitmap = new BitmapImage();
              bitmap.UriSource = new Uri(selectedFileName);
              ImageViewer1.Source = bitmap;
Updated 26-Nov-15 1:28am
George Jonsson 26-Nov-15 9:55am    
How do you define quality in this case? Unfocused image, colors are off, low resolution or what?
What is the resolution of the image you are using?
Sinisa Hajnal 26-Nov-15 10:14am    
Get better source image. There is no out of the box enhancement of the images in WPF. Image processing is complicated subject.
Member 11939306 27-Nov-15 4:13am    
We need improve the tif picture resolution DPI (DotsPerInch) is possible for c# code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900