node-exif: 没有 gps 数据?
node-exif: No gps data?
我正在使用 node-exif 来检索用 iphone 拍摄的图像的元数据。提取了大量数据,但缺少 GPS 数据。 Mac 的 Apple 照片应用显示图像位置。所以我猜数据在任何地方。
var ExifImage = require('exif').ExifImage
try {
new ExifImage({image: 'test.jpg'}, (err, data) => {
console.log(data)
})
} catch(e) {
console.log('Error when trying to retrieve exif data.')
}
在输出中,GPS 属性 为空。
..., gps: {}, interoperability: {}, makernote: { error: 'Unable to extract
Makernote information as it is in an unsupported or unrecognized
format.' } }
makernote 属性 中的给定错误似乎不相关,因为 exif 不会抛出错误,回调中的 err
是 false
.
有什么想法吗?
好的,问题与 Mac OS 照片应用有关。通常相关元数据在导出时会被删除(例如拖出应用 window)。使用内置的导出功能并选中 "location data",图像将被导出,包括位置数据(请参阅文件 > 导出 ...)。
我正在使用 node-exif 来检索用 iphone 拍摄的图像的元数据。提取了大量数据,但缺少 GPS 数据。 Mac 的 Apple 照片应用显示图像位置。所以我猜数据在任何地方。
var ExifImage = require('exif').ExifImage
try {
new ExifImage({image: 'test.jpg'}, (err, data) => {
console.log(data)
})
} catch(e) {
console.log('Error when trying to retrieve exif data.')
}
在输出中,GPS 属性 为空。
..., gps: {}, interoperability: {}, makernote: { error: 'Unable to extract Makernote information as it is in an unsupported or unrecognized format.' } }
makernote 属性 中的给定错误似乎不相关,因为 exif 不会抛出错误,回调中的 err
是 false
.
有什么想法吗?
好的,问题与 Mac OS 照片应用有关。通常相关元数据在导出时会被删除(例如拖出应用 window)。使用内置的导出功能并选中 "location data",图像将被导出,包括位置数据(请参阅文件 > 导出 ...)。