Below is an xmp we use as input to clean out/create new tags. We would like to clean out the <XMP-photoshop> Tags or create them if they do not exist.
For an image with no tags, only (2) of the tags are created (XMP-photoshop:History and XMP-photoshop:LegacyIPTCDigest)
What am I missing here ?
Thanks in advance.
<?xml version='1.0' encoding='UTF-8'?>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about='hs-2008-07-c-full-tif.tif'
xmlns:et='http://ns.exiftool.ca/1.0/' et:toolkit='Image::ExifTool 9.39'
xmlns:ExifTool='http://ns.exiftool.ca/ExifTool/1.0/'
xmlns:System='http://ns.exiftool.ca/File/System/1.0/'
xmlns:File='http://ns.exiftool.ca/File/1.0/'
xmlns:IFD0='http://ns.exiftool.ca/EXIF/IFD0/1.0/'
xmlns:XMP-x='http://ns.exiftool.ca/XMP/XMP-x/1.0/'
xmlns:XMP-avm='http://ns.exiftool.ca/XMP/XMP-avm/1.0/'
xmlns:XMP-crs='http://ns.exiftool.ca/XMP/XMP-crs/1.0/'
xmlns:XMP-dc='http://ns.exiftool.ca/XMP/XMP-dc/1.0/'
xmlns:XMP-photoshop='http://ns.exiftool.ca/XMP/XMP-photoshop/1.0/'
xmlns:XMP-xmp='http://ns.exiftool.ca/XMP/XMP-xmp/1.0/'
xmlns:XMP-xmpDM='http://ns.exiftool.ca/XMP/XMP-xmpDM/1.0/'
xmlns:XMP-xmpMM='http://ns.exiftool.ca/XMP/XMP-xmpMM/1.0/'
xmlns:XMP-xmpRights='http://ns.exiftool.ca/XMP/XMP-xmpRights/1.0/'
xmlns:XMP-iptcCore='http://ns.exiftool.ca/XMP/XMP-iptcCore/1.0/'
xmlns:XMP-dwc='http://ns.exiftool.ca/XMP/XMP-dwc/1.0/'
xmlns:IPTC='http://ns.exiftool.ca/IPTC/IPTC/1.0/'
xmlns:Photoshop='http://ns.exiftool.ca/Photoshop/Photoshop/1.0/'
xmlns:ExifIFD='http://ns.exiftool.ca/EXIF/ExifIFD/1.0/'
xmlns:ICC-header='http://ns.exiftool.ca/ICC_Profile/ICC-header/1.0/'
xmlns:ICC_Profile='http://ns.exiftool.ca/ICC_Profile/ICC_Profile/1.0/'
xmlns:Composite='http://ns.exiftool.ca/Composite/1.0/'>
<Photoshop:Headline></Photoshop:Headline>
<Photoshop:DateCreated></Photoshop:DateCreated>
<Photoshop:Credit>NASA</Photoshop:Credit>
<Photoshop:Source></Photoshop:Source>
<Photoshop:History></Photoshop:History>
<Photoshop:ColorMode></Photoshop:ColorMode>
<Photoshop:ICCProfile></Photoshop:ICCProfile>
<Photoshop:LegacyIPTCDigest></Photoshop:LegacyIPTCDigest>
</rdf:Description>
</rdf:RDF>
Here is the debug output:
exiftool -v2 -e -tagsFromFile ~/blank.xmp hs-1990-07-a-full-tif.tif
Setting new values from /Users/rogers/blank.xmp
Sorry, CanonVRD:XMP is unsafe for writing
Sorry, XMP:XMP is unsafe for writing
Writing PNG:Source
Writing XMP-dex:Source if tag exists
Writing XMP-dc:Source if tag exists
Writing XMP-photoshop:Source if tag exists
Writing IPTC:Source
Writing XMP-photoshop:LegacyIPTCDigest
Writing XMP-photoshop:History
Writing XMP-photoshop:Headline if tag exists
Writing IPTC:Headline
Sorry, File:FileName is unsafe for writing
Sorry, File:FileModifyDate is unsafe for writing
Sorry, File:Directory is unsafe for writing
Writing Composite:DateCreated
Writing XMP-photoshop:Credit if tag exists
Writing IPTC:Credit
Writing Nikon:ColorMode if tag exists
Writing Nikon:ColorMode if tag exists
Sorry, XMP-rdf:About is unsafe for writing
======== hs-1990-07-a-full-tif.tif
Rewriting hs-1990-07-a-full-tif.tif...
Editing tags in: Composite ExifIFD IFD0 IPTC MakerNotes PNG TIFF XMP
Creating tags in: Composite IFD0 IPTC PNG TIFF XMP
FileType = TIFF
MIMEType = image/tiff
ExifByteOrder = II
Rewriting IFD0
Creating XMP
+ XMP-photoshop:History = ''
+ XMP-photoshop:LegacyIPTCDigest = ''
Rewriting IPTC
+ IPTC:Headline = ''
+ IPTC:Credit = 'NASA'
+ IPTC:Source = ''
Rewriting Photoshop
Rewriting IPTC
+ IPTC:Headline = ''
+ IPTC:Credit = 'NASA'
+ IPTC:Source = ''
Copying 1158 image data blocks
1 image files updated
You have 2 problems:
1) Your XML file is incorrect. The tags should be in the "XMP-photoshop" namespace, not "Photoshop".
2) Your command should preserve the family 1 groups when copying by adding "-all:all" after the -tagsFromFile option.
exiftool -v2 -e -tagsFromFile ~/blank.xml -all:all hs-1990-07-a-full-tif.tif
Also note I changed your file to .xml because it is not XMP format.
- Phil
So thankful. :D :D :D
With option 'all:all' <XMP-iptcCore> Tags are no longer created, but <XMP-photoshop> tags are. When 'all:all' is omitted, the opposite happens.
Sorry, XMP-iptcCore:CreatorWorkURL is unsafe for writing
Sorry, XMP-iptcCore:CreatorWorkTelephone is unsafe for writing
Sorry, XMP-iptcCore:CreatorWorkEmail is unsafe for writing
Sorry, XMP-iptcCore:CreatorRegion is unsafe for writing
Sorry, XMP-iptcCore:CreatorPostalCode is unsafe for writing
Sorry, XMP-iptcCore:CreatorCountry is unsafe for writing
Sorry, XMP-iptcCore:CreatorCity is unsafe for writing
Sorry, XMP-iptcCore:CreatorAddress is unsafe for writing
The copying section of the Structured Information documentation (https://exiftool.org/struct.html#Copying) deals with this general question. I have added a note to highlight this specific problem.
This information should be copied with the CreatorContactInfo structure.
- Phil
How do I get both <XMP-iptcCore> and <XMP-photoshop> created from a single blank.xml ?
Thanks
Oh. Good point. The importing from XML doesn't support structured information. So the solution is to add --struct to your import command.
- Phil