title: Why does this sample TIFF import code result in errors?
body: <p>I read <a href="https://docs.microsoft.com/en-us/dotnet/framework/wpf/graphics-multimedia/how-to-encode-and-decode-a-tiff-image" rel="nofollow noreferrer">How to: Encode and Decode a TIFF Image</a> and copied the code </p>
  
  <pre><code>// Open a Stream and decode a TIFF image
  Stream imageStreamSource = new FileStream("tulipfarm.tif", FileMode.Open, 
  FileAccess.Read, FileShare.Read);
  TiffBitmapDecoder decoder = new TiffBitmapDecoder(imageStreamSource, 
  BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
  BitmapSource bitmapSource = decoder.Frames[0];
  
  // Draw the Image
  Image myImage = new Image();
  myImage.Source = bitmapSource;
  myImage.Stretch = Stretch.None;
  myImage.Margin = new Thickness(20);
  </code></pre>
  
  <p>into a console app in Visual Studio 2017.  I added a reference to PresentationCore per <a href="https://stackoverflow.com/a/50192029/9044571">https://stackoverflow.com/a/50192029/9044571</a> and that allowed me to add </p>
  
  <pre><code>using System.Windows.Media.Imaging;
  </code></pre>
  
  <p>But now I am getting an error (Error    CS0144  Cannot create an instance of the abstract class or interface 'Image') associated with the line</p>
  
  <pre><code>Image myImage = new Image();
  </code></pre>
  
  <p>How might I fix this?  Could the problem be that I am doing this from a console app?</p>