title: how do I display an image stored inside a variable in an MVC3 Razor View
body: <p>I have a project in which I need to display thumbnails of image stored locally on the server. At first I tried using a jquery library to just "thumbify" the original images for my view. However, later I realized serving potentially thousands of images this way will really take up the bandwidth. So below is a method that extracts windows thumbnails instead (and only one full time image will be served on demand). </p>
  
  <p>The problem is though, the thumbnail is now inside a variable in a model. I don't know how actually display the image inside a Razor View. So how do I display a System.Drawing.Icon item in a view?</p>
  
  <pre><code>public static System.Drawing.Icon GetThumbnailImages(string imageFilePath) 
          {
              ShellFile shellFile = ShellFile.FromFilePath(imageFilePath);
              Bitmap shellThumb = shellFile.Thumbnail.ExtraLargeBitmap;
              System.Drawing.Icon shellThumb2 = shellFile.Thumbnail.Icon;
              //var shellThumb3 = shellFile.Thumbnail.MediumIcon;
              return shellThumb2;
  
          }
  </code></pre>