title: Reading exif data with .net framework (System.Drawing.Imaging)
body: <p>I am using the .net framework to read the exif metadata from a jpg file. The problem is how to convert the PropertyItem.Value (that is byte array) in a readable form such as a string. </p>
  
  <p>For example with this code I read the GPSAltitude value of a picture:</p>
  
  <pre><code>        var pic = System.Drawing.Image.FromFile(@"c:\mypic.jpg");
          var GPSAltitude = pic.GetPropertyItem(6);
  </code></pre>
  
  <p>and the GPSAltitude.Value is a byte array like this: {75,2,0,0,1,0,0,0}.</p>
  
  <p>I know that the altitude is 587 m.s.l... but how do I go from that byte array to 587 ?</p>
  
  <p>I tried to read it with ASCIIencoding and some other encodings but I get something like "K\0\0\0\0\0".</p>
  
  <p>Any idea ? Thanks</p>