Conversation

Fahim Farook

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
1
0
2

@f Similar to me a few years ago, we had to use an ML algorithm to recognize objects in an image, filter them and write in the photo's metadata. Handling metadata was a mess. 😤

1
0
0
@simonemargio Yeah, that’s what it sounds like … What language/platform were you using?
1
0
0

@f Xcode with Objective-C+Storyboard, I think the model was Inceptionv3, I still have some nightmares at night.

1
0
0
@simonemargio 😛 I’m sorry you had to go through that … I really wish that certain things were better designed instead of just kind of put together as we go along …
0
0
1