title: Problem reading JPEG Metadata (Orientation)
body: <p>I've got a JPEG image which was taken on an iphone. On my desktop PC (Windows Photo Viewer, Google Chrome, etc) the orientation is incorrect.</p>
  
  <p>I'm working on an ASP.NET MVC 3 web application where i need to upload photos (currently using plupload).</p>
  
  <p>I've got some server-side code to process images, including reading EXIF data.</p>
  
  <p>I've tried reading the <code>PropertyTagOrientation</code> field in the EXIF meta data (using GDI - <code>Image.PropertyItems</code>), but the field isn't present.</p>
  
  <p>So it's either some specific iphone meta data, or some other meta data.</p>
  
  <p>I've used another tool like Aurigma Photo Uploader, and it reads the meta data correctly and rotates the image. How does it do this?</p>
  
  <p>Does anyone know what other JPEG meta data could contain the information required in order to know that it needs to be rotated, that is used by Aurigma?</p>
  
  <p>Here's the code i'm using to read the EXIF data:</p>
  
  <pre><code>var image = Image.FromStream(fileStream);
  
  foreach (var prop in image.PropertyItems)
  {
     if (prop.Id == 112 || prop.Id == 5029)
     {
        // do my rotate code - e.g "RotateFlip"
        // Never get's in here - can't find these properties.
     }
  }
  </code></pre>
  
  <p>Any ideas?</p>