I don’t know if this is the same on other platforms/languages but
#Apple #Swift support for image metadata retrieval seems to be rather pitiful 😛 I tried multiple different suggested approaches and lirbaries and all I get are around 4 - 5 meta data items for a particular image.
I use exiftool (
https://exiftool.org/) and I get around 20+ metadata items for the same file.
So I resorted to this exiftool wrapper —
https://github.com/hlemai/ExifTool It is supposed to be using the exiftool libraries but even that got only 18 items and it left out the one item I was actually interested in 😛
So I finally ended up writing some custom code which would run exiftool locally as a task, get the output of the command and then parse the output to get the metadata. That finally worked for me…
But should I have to go through all these hoops to get image metadata when using Swift? I would have thought there was a simpler/easier solution?
Does anyone know of one?
I’m almost tempted to write my own solution in Swift where I read the image raw data, parse the header and get the metadata. But do I really want to? Probably not …
#Apple #Swift #Images #Metadata #Coding