Post not yet marked as solved
Post marked as unsolved with 5 replies, 2,745 views
How does meta data affect the model creation? When I added image meta data to sample, the created model was changed.
this is the code I get meta data from image url:
func getImageMetaData(url: URL) -> CFDictionary? {
if let data = NSData(contentsOf: url),
let source = CGImageSourceCreateWithData(data as CFData, nil) {
let metadata = CGImageSourceCopyPropertiesAtIndex(source, 0, nil)
return metadata
}
return nil
}
when I create photogrammetrySample, this is the code I add meta data to it:
if let metaData = getImageMetaData(url: imageURL) as? [String:AnyObject] {
sample.metadata = metaData
}