XMP:crs WhiteBalance tag modified by ExifTool?

Started by Mac2, January 09, 2015, 01:49:38 PM

Previous topic - Next topic

Mac2

It seems that the Camera Raw namespace tag xmp:crs:WhiteBalance is filled/modified by ExifTool when I run the Exif2XMP / XMP2Exif args files.  This is unexpected.

The crs tag seems to be filled from the EXIF data (same as goes into XMP:exif:WhiteBalance) but not the actual data in the XMP tag (if there is already one in the XMP).

When I make changes to the WhiteBalance in Lightroom, it creates/updates the XMP:crs:WhiteBalance tag. The EXIF tag and the XMP:exif:WhiteBalane remain because they reflect the original EXIF data.

When I then re-import the updated XMP file into my application (applying -use MWG and EXIF2XMP.args), the resulting XMP:crs data still reflects the original EXIF data, not the actual data written by LR to XMP:crs.

I'm puzzled because I did not think that ExifTool touches anything inside the proprietary XMP:crs namespace. This is not part of the tags covered by the MWG mapping rules for EXIF->XMP->EXIF.

A sample of the ARGs file I use for import is in my last post.

https://exiftool.org/forum/index.php/topic,6243.0.html

Phil Harvey

The first line of exif2xmp.args is this:

-XMP:all < EXIF:all

which will copy any same-named tags from EXIF to XMP.  As far as WhiteBalance goes, it will create a new XMP-exif:WhiteBalance (the preferred namespace), but it will update any other WhiteBalance tags that exist.

I agree that this line is a bit of a sledgehammer, and maybe it would be better to do something like this instead:

-XMP-exif:all < EXIF:all
-XMP-tiff:all < EXIF:all


But it would take some effort to figure out the full implications of this.

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

Mac2

Hi, Phil

thanks for looking into this.

This issue 'damages' files for which LR has recorded a custom white balance setting different from EXIF. When you change the WB setting in LR it records that in Adobe's proprietary crs namespace, retaining the original EXIF / XMP:exif values.

I'm reluctant to make modifications to the original ARG files shipped with ET. They usually work great and sticking to them keeps you (and ExifTool) in control about what goes where. And when you change an ARG file to incorporate a change, my software will automatically adapt.

Is there a way to exclude the propriety crs namespace from being updated? I understand your solution but I don't understand enough of how the ExifTool magic works for statements like -XMP:all < EXIF:all  ...

Would it not be easier to interpret this as "only XMP:exif and XMP:tiff, but no proprietary namespaces"? Most RAW processors/editors these days keep data in XMP, especially custom settings in custom namespaces. Overwriting anything that happens to share a name with a 'standard' EXIF tag is probably not a good idea...

Phil Harvey

I agree with you, but will need to find some time to work on this.  Just thinking about this quickly, copying EXIF only to XMP-exif and XMP-tiff will miss some things that should be written (ie. XMP-xmp:CreateDate).

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

Alan Clifford

I find this thread, and its title, misleading as it implies that exiftool has gratuitously changed the metadata.

Phil Harvey

I can see that.  To clarify:  ExifTool was only doing what it was told.  The question is whether the exif2xmp.args file included in the full ExifTool distribution could be improved, which only affects people who are using the -@ option with this argument file.

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

Mac2

Quote from: Phil Harvey on January 11, 2015, 02:00:10 PM
I agree with you, but will need to find some time to work on this.  Just thinking about this quickly, copying EXIF only to XMP-exif and XMP-tiff will miss some things that should be written (ie. XMP-xmp:CreateDate).
- Phil
I understand. The way I see it, XMP-exif, XMP-tiff and XMP-xmp (and even XMP::photoshop) are all standard (ehem) namespaces and covered (mostly) by the MWG recommendations and their mapping rules. I see do danger here. ExifTool with -use MWG and the supplied ARGS files do a great job in mapping data between the different standards.

It's only proprietary vendor-specific namespaces like XMP:crs, XMP::acdsee, XMP::MediaPro or XMP::ExpressionMedia etc. which should not be updated 'accidentally' by something like -XMP:all < EXIF:all. Or there should be a way to disable this. I prefer to treat the proprietary namespaces as opaque and never touch them. Nobody knows what the vendors put into these namespaces.

Maybe something along the lines:

-XMP-exif:all < EXIF:all
-XMP-tiff:all < EXIF:all
-XMP-xmp:all < EXIF:all
# probably?
-XMP-photoshop:all < EXIF:all



Phil Harvey

How does this work for you?

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

Mac2

Hi, Phil

I have replaced the standard args file with the new version.
Then I made a couple of changes to XMP data in my application, for tags which need to be mapped between XMP and EXIF (artist, date & time, description, copyright) etc. and updated the file (this writes XMP data and then runs XMP2EXIF, XMP2IPTC etc.). The white balance in the crs namespace now is retained, which is the result I had hoped for. Other EXIF data is synchronized nicely between XMP and EXIF, and between EXIF and XMP on re-importing the file.

LR, after a forced re-import of the metadata showed the new data and also retained the white balance and other settings I had changed before my attempt. So the data in the crs namespace is now properly retained. LR gives only a pretty limited amount of control over metadata but from what I can tell, everything goes where it's supposed to be and proprietary data is left alone. Excellent  :) :)

Do you plan to replace the existing args file with the new version in future versions of ExifTool?

Phil Harvey

Yes.  I don't think this change will cause any problems.

The corresponding xmp2exif.args is attached, and I will change that as well.

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

Mac2

Excellent. I will deploy this file as well and use it for a while in my tests. If something shows up, I'll let you know.