Simple swiftWrapper to ExifTool (https://exiftool.org)
- iOS 14.0+ / macOS 11+ / tvOS 14.0+
- Xcode 12+
- Swift 5.3+
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Once you have your Swift package set up, adding SunburstDiagram as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/hlemai/ExifTool.git")
]
Get all metadata in a [String:String] dictionnary.
ExifTool.setExifTool("/path/to/exiftool")
let testFilePath = "DSC04247.jpg"
let url = URL(fileURLWithPath: testFilePath)
let exifData = ExifTool.read(fromurl: url)
// optionnally it is possibile to filter to specific tags by tagname : ExifTool.read(from:url,tags:["ISO"])
for meta in exifData {
print("\(meta.key)->\(meta.value)")
}
// to get in a dictionnary with local key
for meta in exifData.getMetadata(lang: "fr") {
print("\(meta.key)->\(meta.value)")
}