答案 0 :(得分:1)
原来很简单:
let path = // Some Image path on disk
let url = NSURL.fileURL(withPath: path)
let imageSource = CGImageSourceCreateWithURL(url as CFURL, nil)
if imageSource != nil {
let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSource!, 0, nil)
var dict = imageProperties as! Dictionary<String, Any>
print(dict["ProfileName"]!)
}