title: Finding out the ContentType of a Image from the byte[]
body: <p>Is there a way to find out what the ContentType of an image is from only the original bytes?</p>
  
  <p>At the moment I have a database column that stores only the byte[], which I use to display an image on a web page.</p>
  
  <pre><code>MemoryStream ms = new MemoryStream(imageBytes);
  Image image = Image.FromStream(ms);
  image.Save(context.HttpContext.Response.OutputStream, &lt;--ContentType--&gt;);
  </code></pre>
  
  <p>I could of course just save the ContentType in another column in the table, but just wondered if there was another way e.g. maybe .Net has a way to interrogate the data to get the type.</p>