title: Extract image file metadata
body: <p>I want to be able to extract an image's metadata and extended properties without opening the file.  In other words, how do I programatically access the information shown when you right-click a file in windows and select the &quot;Details&quot; tab?</p>
  <p><img src="https://i.stack.imgur.com/Q9LDY.png" alt="Screenshot" /></p>
  <p>What is the correct way to do this using .Net Framework 4.5 and higher?  I have found various ways of doing this, but the articles all refer to .Net Framework 2 and is, to say the least, tedious and probably outdated.  Specifically, are there any libraries which makes this easy to do?</p>
  <h3>EDIT</h3>
  <p>I need to be able to get the height and width dimensions for images in the following formats: png, jpg, jpeg, gif, bmp and pdf (it is safe to assume that the pdf consists of 1 page only).</p>