Tags "go missing" when writing tags to many image files from XMP files

Started by QPRJohn, October 21, 2014, 02:57:22 PM

Previous topic - Next topic

QPRJohn

I hope I have described my problem in enough detail:-

Using ExifToolIO.dll, I have code that will, using the -tagsfromfile argument, copy tags from an XMP file to images being transferred to a hard drive from a CF Card. I have noticed that several Tags "go missing" when I view the images in Photo Mechanic several tags are not shown. (when I "read" the same images using exiftool all the tags are found?)


The method I use to produce the "XMP" files is by using arguments similar to the following: -

" -CaptionWriter="Caption details here" -Writer-Editor="Caption details here"  "G\XMP\lastXMP.xmp"

When I "read" the "lastXMP.xmp" file to extract the tags to populate my form's textboxes, this works perfectly each time. If I use the same code writing to an image, that also works fine.

Should I use the following to produce an "xml" file. Then use the "xml" file for the "-tagsfromfile" source?

exiftool a.jpg -X > a.xml

Has anyone else had this problem?

I'm using VB.Net (Visual Studio 2010 Professional) on Windows 7 Professional.

Thanks John

Phil Harvey

I suspect that your problem may be touched on in the last paragraph of FAQ number 3.  You must be careful when mixing IPTC and XMP tags.  Writer-Editor is IPTC, but CaptionWriter is 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 ($).

QPRJohn

I'm aware of the various IPTC, XMP and EXIF tags sharing the same information.

To find the tags I was producing the metadata in each application (Photoshop & Photo Mechanic) reading them with Exiftool to get the tags names and then build the argument string including each of the IPTC, XMP and EXIF tags. EG:-



        strExifArg = strExifArg & " -Exif:Copyright=""" + Copyright + Chr(34)
        strExifArg = strExifArg & " -XMP-dc:rights=""" + Copyright + Chr(34)
        strExifArg = strExifArg & " -CopyrightNotice=""" + Copyright + Chr(34)



In the case above would I modify it to:-



strExifArg = strExifArg & " -MWG:Copyright=""" + Copyright + Chr(34)



When I read the same tags from an image I do the same thing by reading each tag.

-John

Phil Harvey

Hi John,

My thought was that perhaps you need to update IPTCDigest, because have seen some applications ignore some XMP when this isn't done.  But I can't say whether or not PhotoMechanic cares about this.  I think maybe this question is better asked in a PhotoMechanic forum.  Also, more details about which tags go missing would be 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 ($).

QPRJohn

Hi Phil

Thanks for the reply.

To clarify, is the IPTCDigest done when writing the "MWG:" tags?

I'm not by my own PC at the moment, I'll list the tags that are "missing" later.

This only happens when I'm using -tagsfromfile, where the tags are taken from an XMP file and transferred to a JPG file that is straight from the camera.

Thanks John

Phil Harvey

IPTCDigest is only written automatically with the MWG tags.  Otherwise you need to update it yourself.

It doesn't matter where the information came from.  The only important thing is what was written.

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

QPRJohn

Hi Phil

I've tried several different things, one being producing an XMP using my app (with Exiftool), then using the same XMP transferring images from a card to my PC using Adobe Bridge, Photo Mechanic and my app. Not sure if this is correct but I included the the following tag " -LegacyIPTCDigest=askjgd0987sfa0978f" ?

After transferring the metadata to images using Adobe Bridge & Photo Mechanic, all the metadata can be seen in all three apps.

When I use my app to transfer the images the metadata can be seen in my app and Photoshop, there are quite a few tags not showing in Photo Mechanic. Photo Mechanic has two options, 1 Read embedded XMP before IPTC, 2. Read embedded IPTC before XMP, (default is read XMP first) when I swap this option I can see most of the missing tags but others then go missing?

I have attached a copy of the xmp.

Any ideas?

-John


QPRJohn

List of Missing Tags

Photomechanic set to read XMP first (Default)

-Headline

-IPTC:Credit
-IPTC:Source

-XMP-iptcExt:Event
-XMP:Event

-MWG:City

-EditStatus
-Category

-SupplementalCategories
-Urgency


Photomechanic set to read IPTC first

-xmp:Description
-ImageDescription
-Caption-Abstract
Replacing the three above with -MWG:Description makes no difference

-CaptionWriter
-Writer-Editor

-XMP-xmp:keywords
-XMP-dc:subject=
Replacing the two above with -MWG:Keywords= makes no difference


-XMP-dc:Creator
-By-line
Replacing the two above with -MWG:Creator makes no difference

-By-lineTitle
-AuthorsPosition

-XMP-dc:rights
-CopyrightNotice
Replacing the two above with -MWG:Copyright makes no difference


-XMP-iptcExt:Event
-XMP:Event

-Sub-location
-Location
Replacing the two above with -MWG:Location makes no difference

-State
-Province-State
Replacing the two above with -MWG:State makes no difference

-Country
-Country-PrimaryLocationName
Replacing the two above with -MWG:Country makes no difference

-Country-PrimaryLocationCode
-CountryCode

-Title
-ObjectName

-TransmissionReference
       
-OriginalTransmissionReference

-Instructions
-SpecialInstructions

Thanks

-John


QPRJohn

Additional information - I used the -tagsfromfile option in my app and copied from one jpeg to another and no tags are missing?

Phil Harvey

It seems like it ignores just about everything (including many IPTC tags) when set to read IPTC first.

I don't understand what you mean by "replacing with -MWG:xxx".  The ExifTool MWG tags are composite tags based on the value of the corresponding EXIF, IPTC and XMP tags.  They are not a physically different tag.

I think you need to go to a PhotoMechanic forum to understand what their software is doing.

Again, if possible try writing one of these "missing" tags using PhotoMechanic, then use ExifTool to see what changed. (a-la faq 3)


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

Hayo Baan

I think I can help here as I have fair understanding of what PM does and how it works. First of all, as IPTC simply contains less data than XMP, keep your PM preferences to read XMP before IPTC. Note though that if PM found XMP tags, the IPTC info is no longer taken into account (heck, you told it to use the XMP)! Unless you explicitly copy data into both the XMP and IPTC counterpart tags with exiftool, they will not show up at both locations (PM does this for you when you update metadata there). MWG does take care of some of the tags for you here, but not all. This might explain why you don't see all tags present.

If you post a sample file and a list of metadata you require to be present, I'm sure I can help you with the commands to use to get the results you're after.
Hayo Baan – Photography
Web: www.hayobaan.nl