Here is something based on FilterRules
and using your post of Exif metadata format.
FilterRules
FilterRules["Exif" /. (MetaInformation /. Options[i, MetaInformation]), "XResolution"]
{"XResolution" -> 300}
There may be more elegant ways to extract the rules which form part of MetaInformation
, I await them with interest.
This unpacks nested sets of rules:
FilterRules[ Options[i, MetaInformation] //. {_ -> z_} -> z, "XResolution"]
{"XResolution" -> 300}
OptionValue
Here is an interesting alternative which does require some knowledge of the structure of the MetaInformation
but is otherwise nicely concise.
OptionValue[Options[i, MetaInformation], MetaInformation -> "Exif" -> "XResolution"]
300