我正在iOS中使用DJISDK从飞机上下载图片 .
我正在使用 PlaybackManager
类的 downloadSelectedFiles
方法 .
这是我的进程回调:
process: { (data, error) in
if data != nil{
if self.downloadedImageData != nil{
self.downloadedImageData!.append(data!)
}else{
self.downloadedImageData = data!
}
}
}
这是filecompletition回调:
fileCompletion: {
self.downloadedFilesCount += 1
let image = UIImage(data: self.downloadedImageData!)
if let img = image {
self.downloadedImagesArray?.append(img)
}
self.downloadedImageData = nil
}
我正在检索图像但没有EXIF数据 . 如何获取该信息并将其添加到图像中?我已经下载并尝试了iOS-MediaManagerDemo,它是相同的,下载图像,但没有exif数据,但官方DJI Go应用程序检索所有信息,所以必须有一些方法来做到这一点 .
1 回答
关于空元数据还有similar issue in their forums和
downloadSelectedFilesWithPreparation
. 创建帖子的用户也找到了解决方案:尝试使用fetchFileDataWithOffset:updateQueue:updateBlock(它将在Swift中被称为
fetchFileData(with:updateQueue:updateBlock)
)示例代码(objc):here