title: How to get Memory Stream/Base64 String from Image.Source?
body: <p>I have a dynamically created Image control that is populated via a OpenFileDialog like:</p>
  
  <pre><code>OpenFileDialog dialog = new OpenFileDialog();
  if (dialog.ShowDialog() == true)
  {
      using (FileStream stream = dialog.File.OpenRead())
      {                    
          BitmapImage bmp = new BitmapImage();
          bmp.SetSource(stream);
          myImage.Source = bmp;
      }
  }
  </code></pre>
  
  <p>I want to send the image back to the server in a separate function call, as string via a web service.</p>
  
  <p><strong>How do I get a memory stream / base64 string from myImage.Source</strong></p>