I want to be able to extract image metadata and advanced properties without opening a file. In other words, how can I programmatically access the information displayed when I right-click on a file in the windows and select the Details tab?

What is the correct way to do this with .Net Framework 4.5 and higher? I found various ways to do this, but all of the articles are related to .Net Framework 2 and are at least tedious and probably outdated. In particular, are there any libraries that make this easy to do?
EDIT
I need to get height and width dimensions for images in the following formats: png, jpg, jpeg, gif, bmp and pdf (we can safely assume that PDF consists of only 1 page).
source share