macos - 将 lat/lng 添加到图像以便 Finder/Photos/Lightroom 识别位置?
问题描述
“有效”下方的 exiftool 命令将数据写入文件(参见下面的 grep)。但是,Finder、照片和 Adobe Lightroom 无法识别图像有位置。为什么不?
我从用 iphone 拍摄并标记为“正确”的图像中获取了所有这些值 - 该文件显示了上述所有程序中的位置数据。似乎还有数百个其他 exif 属性,所以我不确定缺少什么或无效。
exiftool \
-GPSLongitude="110 deg 12' 12.40\" E" \
-GPSLatitude="7 deg 36' 28.92\" S" \
-GPSLatitudeRef="South" \
-GPSLongitudeRef="East" \
-GPSDateStamp="2019:06:04" \
-GPSTimeStamp="08:09:53" \
-GPSStatus="Measurement Active" \
-GPSMeasureMode="3-Dimensional Measurement" \
-GPSMapDatum="WGS-84" \
-GPSDifferential="No Correction" \
screenshot1.png
1 image files updated
exiftool screenshot1.png | grep GPS
GPS Version ID : 2.3.0.0
GPS Latitude Ref : South
GPS Longitude Ref : East
GPS Time Stamp : 08:09:53
GPS Status : Measurement Active
GPS Measure Mode : 3-Dimensional Measurement
GPS Map Datum : WGS-84
GPS Date Stamp : 2019:06:04
GPS Differential : No Correction
GPS Date/Time : 2019:06:04 08:09:53Z
GPS Latitude : 7 deg 36' 28.92" S
GPS Longitude : 110 deg 12' 12.40" E
GPS Position : 7 deg 36' 28.92" S, 110 deg 12' 12.40" E
解决方案
在这种情况下,问题是您使用的是 PNG 文件。在大多数情况下,缺乏对 PNG 文件中元数据的软件支持。如果您将其转换为另一种格式,例如 TIFF,这将是一种无损转换,那么您可能会获得更好的结果。
此外,您还可以尝试将数据添加到 XMP 组,这可能会为您提供更好的 Lightroom 效果(尽管可能不是其他的),因为 XMP 是 Adobe 创建的。更改您的命令,使其具有XMP:
前缀(即XMP:GPSLongitude
,XMP:GPSLatitude
)。此外,您必须使用XMP:GPSDateTime
而不是单独的GPSDateStamp
andGPSTimeStamp
标记并删除 Ref 标记(GPSLatitudeRef
, GPSLongitudeRef
,但GPSAltitudeRef
如果有,请保留),因为 XMP 标记直接在标记中包含参考方向。
推荐阅读
- azure-logic-apps - 逻辑应用程序 - 停止在周末运行的 Blob 触发器
- go - 如何将大师与 Visual Studio 代码集成?
- react-native - 在登录状态后对原生 redux 做出反应,在渲染之前没有更新
- javascript - 我想知道我可以在一条路线中读取两个 json 文件吗?
- elasticsearch - 访问 ElasticSearch2.4.3 集群环境的 URL
- javascript - 获取一个或多个以数组开头和结尾的字符串
- javascript - 使用 Array.prototype.filter() 解决这个 JS 问题
- user-interface - 在flutter中调用null的getter给出错误屏幕
- ios - 全屏操作扩展iOS13
- macos - 在mac中传递一个字符串来打开命令