Get EXIF Data from Image in Swift
Revision as of 21:53, 16 October 2021 by PeterHarding (talk | contribs) (Created page with " This seems to work: <pre> import ImageIO ... func getExif(_ uRLToTheImageFile: URL) { if let imageSource = CGImageSourceCreateWithURL(fileURL as CFURL, nil) { l...")
This seems to work:
import ImageIO ... func getExif(_ uRLToTheImageFile: URL) { if let imageSource = CGImageSourceCreateWithURL(fileURL as CFURL, nil) { let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, nil) if let dict = imageProperties as? [String: Any] { print(dict) } } }
From - http://stackoverflow.com/questions/40175160/exif-data-read-and-write