Writing data to new IPTC Extended, version 1.2

Started by btully, December 17, 2014, 04:32:01 PM

Previous topic - Next topic

btully

I am able to read data out of files using the new standard, but not able to write.  When data is extracted, it presents similar to
XMP-iptcExt:AOTitle:value1 or
XMP-iptcExt:AOSourceInvNo:value2

I can write from Photoshop CC 2014, but would like to work directly from ExifTool.  Will this require an upgrade of the software?  Perhaps a library I need to install?
Please advise.

Phil Harvey

I'm afraid that I need some more details to understand what is going on:

1) what command are you using to extract this?

2) what version of exiftool are you using?

3) having the example XMP would be very helpful.

- 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 ($).

btully

1. exiftool -struct -X>example.xml CC_3.tif

2. version 9.78

3.  see attachment

thank you for your quick reply.

Phil Harvey

OK.  You're talking about outputting structured XML, then trying to read it back again?  ExifTool doesn't currently support reading back structured XML (or structured JSON for that matter).  This is on my to-do list, but the implementation isn't trivial.

Currently, the only structured information that ExifTool will read is XMP.  It would be preferable if you could output in XMP format:

exiftool -struct -o example.xmp CC_3.tif

Or some other binary metadata format (MIE or EXV) if you are interested in metadata types other than just XMP.

- 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 ($).

btully

 I am mostly interested in writing the data.  I have a customer that wants to add metadata to a batch of images after the fact.  Rather than write to a made up schema, which might not be readable later by Photoshop, I want to write it to a standard schema.  The IPTC extended looked like the best match for me.  If you have a recommendation on a schema for retail data (SKU, size, color) I will use that instead.

Attached is the same file output to xmp.

Phil Harvey

It sounds like XMP should work for you then.

- 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 ($).

btully

So I have to write to an external XMP file then import?  I am unable to write directly to the file.  For example, if I try
exiftool -Iptc4xmpExt:PersonName+='Mr. Smith' CC_3.tif

I get a reply of
Warning: Tag 'PersonName' does not exist
Nothing to do.

I get this reply for any valid tag that does not already exist in the file.

Phil Harvey

There are many ways to write to the file.  You can copy from an XMP source file, or enter the value on the command line as in your example.  However, you must use the correct ExifTool GROUP:TAG name.  Extract with the -G1 -s options to see the family 1 group names and tag names, or check the XMP tags documentation for a complete list.

In this specific case, I think the command you are looking for is:

exiftool -XMP-iptcExt:PersonInImage+='Mr. Smith' CC_3.tif

- 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 ($).

btully

thank you,

I was incorrectly entering the group and tag names.  I can enter the data correctly now.