0
swift内の特定の写真の詳細情報セクションのすべてをプログラムで取得する方法はあまりありません。私は特にカラープロファイルデータに興味があります。何か案は?非常に簡単であることが判明即座にディスク上の画像のカラープロファイルデータを取得する方法
swift内の特定の写真の詳細情報セクションのすべてをプログラムで取得する方法はあまりありません。私は特にカラープロファイルデータに興味があります。何か案は?非常に簡単であることが判明即座にディスク上の画像のカラープロファイルデータを取得する方法
:
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"]!)
}