本文介绍了使用EXIF数据从DJI无人机检索图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iOS中使用DJISDK从飞机上下载图片.

I'm using the DJISDK in iOS to download pictures from the aircraft.

我正在使用PlaybackManager类中的downloadSelectedFiles方法.

I'm using the downloadSelectedFiles method from PlaybackManager class.

这是我的流程回调:

process: { (data, error) in
    if data != nil{
        if self.downloadedImageData != nil{
            self.downloadedImageData!.append(data!)
        }else{
            self.downloadedImageData = data!
        }

    }
}

这是文件补全回调:

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应用会检索所有信息,因此必须有某种方法可以做到.

I'm correctly retrieving the image but without the EXIF data. How can I get that info and add it to the image?I already downloaded and tried the iOS-MediaManagerDemo and it's the same thing, downloads the image but without the exif data but the official DJI Go app retrieves all the info so there´s must be some way to do it.

推荐答案

还有一个他们论坛中的类似问题,其中包含空白的元数据和downloadSelectedFilesWithPreparation.创建帖子的用户还找到了解决方案:

There's also a similar issue in their forums regarding empty metadata and downloadSelectedFilesWithPreparation. The user that created the post also found a solution:


尝试使用 fetchFileDataWithOffset:updateQueue:updateBlock (在Swift中将其称为fetchFileData(with:updateQueue:updateBlock))


Try using fetchFileDataWithOffset:updateQueue:updateBlock (it will be called fetchFileData(with:updateQueue:updateBlock) in Swift)


示例代码(objc):此处


Sample code (objc): here

这篇关于使用EXIF数据从DJI无人机检索图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 14:41