title: Loading remote image and writing it from controller
body: <p>I would like to return an image from a controller and be able to apply my own filters on it.</p>
  
  <p>I created a controller and would like it to <code>return Content(Img.BinaryData,"image/jpeg");</code></p>
  
  <p>A view is not needed.</p>
  
  <p>I'm using <strong><a href="http://dynamicimage.apphb.com/" rel="nofollow">DynamicImage</a></strong> plugin to get a remote image and do some filters on it, but it returns a <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap%28v=vs.110%29.aspx" rel="nofollow"><code>System.Windows.Media.Imaging.WriteableBitmap</code></a> object.</p>
  
  <p>Here is the furthest I got, but I'm trying to return it as binary data:</p>
  
  <pre><code>using SoundInTheory.DynamicImage.Sources;   
  
  var composition = new Composition();
  ImageLayer layer = new ImageLayer { Source = new RemoteImageSource { Url = "http://www.google.com/images/srpr/logo4w.png" } };
  composition.Layers.Add(layer);
  
  GeneratedImage generatedImage = composition.GenerateImage();
  
  var Img = generatedImage.Image; // returns System.Windows.Media.Imaging.WriteableBitmap
  
  return Content(Img.ToString(),"image/jpeg");
  </code></pre>
  
  <p>What am I missing here?</p>