访问 UIImagePickerController - iOS/iPhone 拍摄的图像的元数据(exif 标签)
是否可以访问 iOS 中 UIImagePickerController 捕获的图像的元数据?我知道这可以通过相机应用程序捕获的图像(或以其他方式存在于 iPhone 照片库中)的 AssetLibrary 框架来完成,但是开发人员可以在用户拍摄照片后立即从应用程序中访问任何元数据/exif 信息吗?图片?我正在从拍摄后的图像中寻找任何类型的相机曝光级别信息。谢谢!
Is it possible to access the metadata of an image captured by UIImagePickerController in iOS? I understand this can be done with AssetLibrary framework for images captured by the camera application (or otherwise present in the iPhone photo library), but can a developer access any of the metadata/exif info from within an application right after a user has taken a picture? I'm looking for any type of camera exposure-level info from an image after it has been taken. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然,您可以在拍摄图像后立即访问其元数据。选择图像后系统调用的协议方法是:
NSDictionary 参数 info 包含一个键:
UIImagePickerControllerMediaMetadata
现在,如果我能弄清楚如何获取 exif 标签或任何曝光从这个光级信息推断出关于光级的基本信息我会很高兴。 :)
Apparently, you can access the metadata of an image right after it has been taken. The protocol method that is called by the system after an image has been selected is:
The NSDictionary argument, info, contains a key:
UIImagePickerControllerMediaMetadata
Now if I can figure out how to get the exif tags or any exposure-level information from this to infer basic information about light-level I will be happy. :)
更新到iOS 11,使用照片框架
Objective - C:
您还需要照片库使用(NSPhotoLibraryUsageDescription)的权限,然后可以添加以下代码来查看是否加载或查看是否出现
updated to iOS 11 with photos framework
Objective - C:
You also need the permission of Photo library Usage (NSPhotoLibraryUsageDescription) and then can add the following code to view did load or view did appear