Reading and Editing Adobe XMP and IPTC Metadata from DNGs, etc

991 Views Asked by At

I am working on a project that involves analyzing XMP, IPTC metadata values for sets of files in a directory and modifying them under certain conditions. I wanted to get thoughts on what the cleanest way of doing this was outside of writing in C++ to work with the Adobe XMP SDK. I have read about using the Python XMP Toolkit with Exempi, but initially began having issues with the libraries. I am open to solutions like libraries for Java, PHP, JS, Python, but before I put too much effort into it, I wanted to see if anyone knows the best supported and cleanest solution to working with these types of metadata.

1

There are 1 best solutions below

1
StarGeek On

If you're open to adding an external program, then exiftool is the gold standard. So much so that IPTC uses it in the example images on their sites and they communicate with the author about upcoming changes.

You can find a wrapper for it in most languages. For example, PyExiftool. This is important because you don't want to call exiftool once per file as "the startup time of loading ExifTool is significant" (see exiftool Common Mistake #3).