ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Louie Sherwin on April 29, 2010, 10:47:56 PM

Title: How to move xmp data from a dng file back to the original raw file
Post by: Louie Sherwin on April 29, 2010, 10:47:56 PM
I think that the answer is pretty simple but I noticed some discrepancies and wanted to ask about this first. The dng files and the raw files all have the same base file name but are in different directories. When I run the following I get what look the correct .xmp files from each dng file

exiftool -o %d%f.xmp dng_directory

However, if I examine each file by running the following commands in side by side windows the results are slightly different.

exiftool -xmp:all -s -G1 sherwin_20081210_0023.dng | sort
exiftool -xmp:all -s -G1 sherwin_20081210_0023.xmp | sort

Can you explain?

I have attached the output of each of above commands.

tks, louie
Title: Re: How to move xmp data from a dng file back to the original raw file
Post by: Phil Harvey on April 30, 2010, 06:38:18 AM
Hi Louie,

Your command uses the same technique as the -tagsFromFile option to transfer information to the XMP file.

Quote from: -TagsFromFile Documentation
            By default, this option will commute information between same‐
            named tags in different groups and write each tag to the preferred
            group.  This allows some information to be automatically
            translated when copying between images of different formats.
            However, if a group name is specified for a tag then the
            information is written to the original group (unless redirected to
            another group, see below).  This works even if "All" is used as a
            group name, so "−All:All" is used to specify that all information
            be copied to the same group in the destination file.

To copy all writable tags from XMP to XMP, add -all:all after the -o option.  Alternatively you can copy the exact XMP record by adding -xmp after -o -- this will also include any tags which are not writable by ExifTool as well as any padding which ExifTool doesn't normally add to XMP files.

- Phil

[edit] I should have mentioned that it would be more efficient to use -xmp:all instead of -all:all above.  -xmp:all will have the same effect since only XMP is written to an XMP file anyway, but it won't try to copy tags which can't be written to the XMP file.
Title: Re: How to move xmp data from a dng file back to the original raw file
Post by: Louie Sherwin on May 01, 2010, 09:30:54 PM
Hi Phil,

Thanks for the additional information. After testing I determined that using the -xmp option is the one I need. This was the only option that extracted my ACR snapshots.

tks, louie