从相机照片元数据获取 GPS 数据
在 UIImagePickerController 的帮助下,我为我的应用程序获取了一张照片。是否可以从委托获取地理数据:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
这是信息字典,是否可以从中获取地理标签?
I get a photo for my app with help of UIImagePickerController. Is it possible to get Geo data from the delegate:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
Here is info dictionary, is it possible to get Geo tags from it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 EXIF 库 http://code.google.com/p/iphone-exif/
代码
SO问题: UIImagePickerController 和提取现有照片的 EXIF 数据
use EXIF library http://code.google.com/p/iphone-exif/
code
SO question: UIImagePickerController and extracting EXIF data from existing photos
在 iOS 5.1.1 之前,UIImagePickerController 不会将 GPS 位置数据添加到使用它拍摄的照片中。相机应用程序的位置服务设置是什么并不重要,它仅控制该应用程序而不是 UIImagePickerController。
您将需要使用 CLLocation 类来获取位置,然后将其添加到使用 UIImagePickerController 拍摄的任何图像和视频中。
Up to and including iOS 5.1.1, the UIImagePickerController does not add GPS location data to photos shot using it. It doesn't matter what the setting of location services for the Camera app is, that only controls that app not the UIImagePickerController.
You will need to use the CLLocation class to get the location and then add that to any images and videos shot with the UIImagePickerController.