开发者

How do I access geotags in iphone-pictures

开发者 https://www.devze.com 2023-03-22 00:52 出处:网络
I am trying to access the gps-coordinates stored in the metadata of a picture taken with the iphones camera. I can extract some information from the picture (colorspace开发者_StackOverflow社区, resolu

I am trying to access the gps-coordinates stored in the metadata of a picture taken with the iphones camera. I can extract some information from the picture (colorspace开发者_StackOverflow社区, resolution etc) but i cant seem to get to the geotag. How do I do this?

I access the meta data using this line of code:

NSDictionary *metaData = [info objectForKey:UIImagePickerControllerMediaMetadata];

where "info" is the NSDictionary reurned by UIImagePickerController


There are a list of keys available from Apple, for images that have Global Positioning Information.

http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGImageProperties_Reference/Reference/reference.html

I would assume you are interested mainly in:

const CFStringRef kCGImagePropertyGPSLatitude;
const CFStringRef kCGImagePropertyGPSLongitude;
0

精彩评论

暂无评论...
验证码 换一张
取 消