Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将 GPS 元数据添加到图像中。我参考了此链接以了解如何设置其他键值。但我无法找到如何获得“图像方向”,即键的值kCGImagePropertyGPSImgDirection和kCGImagePropertyGPSImgDirectionRef. 我不知道“图像方向”是什么意思,也不知道从哪里获得价值。位置管理器的location属性没有任何此类属性。
kCGImagePropertyGPSImgDirection
kCGImagePropertyGPSImgDirectionRef
location
尝试使用CGImageSourceRefandCGImageSourceCopyPropertiesAtIndex(...)获取 GPS 数据,它返回 Image Direction 和 Image Direction Ref。它们是 Cocoa/Cocoa.h 的一部分。
CGImageSourceRef
CGImageSourceCopyPropertiesAtIndex(...)
您也可以下载 Apple 的 ImageApp 示例以了解它的使用方式。