I do not believe Image Events is able to get that type of meta data from the photo however
mdls can do it, e.g.
mdls -name kMDItemLatitude -name kMDItemLongitude /path/to/photo however it all depends what exactly your trying to do with this info. I personally prefer using
exiftool however you'd have to install it.
To answer the question in your comment:
If you query an
attributeName when using
-raw and the
attributeName doesn't exist the output is literally
(null) and if you want it to be something else then use
−nullMarker markerString, e.g.:
−nullMarker "Does Not Exist"
mdls -name kMDItemFake -raw -nullMarker "Does Not Exist" /path/to/photo
In the example command above
kMDItemFake is a fake
kMDItem item, so that command will output:
Does Not Exist instead of
In other words, if as example the photo doesn't have
kMDItemLatitude info and you query for it the output will be
(null) when using
mdls -name kMDItemLatitude -raw. To change that, use
kMDItem doesn't exist and you want no output when using
mdls -name attar -raw then use
mdls -name attar -raw −nullMarker '' /path/to/photo.
mdlscan do it, e.g.
mdls -name kMDItemLatitude -name kMDItemLongitude /path/to/photohowever it all depends what exactly your trying to do with this info. I personally prefer using
exiftoolhowever you'd have to install it. If you'd provide more information about what your trying to do and be a bit more explicit and specific it would be easier to write up and answer.
-nullMarkeroption (it doesn’t seem t work for me, even when I use the
rawoption), or whether there is an alternative for RAW files, that would be a bonus. Otherwise, it’s good.