Matching an image tags with a database dump

Started by dpayeur, May 16, 2011, 03:16:34 PM

Previous topic - Next topic

dpayeur

Hello,

I'm using exiftool in my photo manager to extract EXIF/IPTC info. It works great so far. This thing is awesome.

One feature I would like to add is better formatting of tag values and maybe editing.
For these I need to know what type of datum is used for each tag and if it can be edited at all.

But I can't find a way to match the output of an image tag extraction with the output of a database dump.

Has someone figured out the relationship between the various infos of a "exiftool -listx" command vs. the ones provided by a command like "exiftool -G -D myfile.jpg" ?
I can't find anything deterministic enough. For example, listx has many entries for EXIF but -G -D only offers one... I tried using g0, g1 to no avail.

Is there a simple way? Or may a switch that would output the raw descriptors when extracting from an image file?

thanks
donald

Phil Harvey

Hi Donald,

It is more complicated than this.  The format information is stored in the EXIF, so it may be different for different files and may contradict the database format (although this isn't likely, I have certainly seen it).

But to match up these values, use the tag id of the -listx output and match this up with the TagID extracted with the -D option.

An alternative would be to use the -v2 option to get the format information directly from the source file.  This would be more reliable for the reason mentioned above.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dpayeur

Thanks for your quick response, Phil.

Sorry for mine being so late, I've been away.

I looked at the -v2 output format you suggest and it does indeed show the tags' storage size and type, but then I lose the nicely formatted values of my current command line (for example '2' instead of 'Program AE' or '10/8000' instead of '1/800').

Maybe I will end up running the tool once with -G -D and then run it again with -v2 and use the "-Tag 0x.... (x bytes, type)" part of the latter and match it against the former.

There wouldn't be a switch I could add to -D -G to have the tags' storage size and type along the nicely formatted tag values, within the tabular output format, would there? :-)

Thanks again.
Donald

Phil Harvey

Hi Donald,

Quote from: dpayeur on May 25, 2011, 03:40:01 PM
There wouldn't be a switch I could add to -D -G to have the tags' storage size and type along the nicely formatted tag values, within the tabular output format, would there? :-)

You've got a cruel sense of humour. :P

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).