Indelible Copyright Tag

Started by david, January 12, 2017, 05:51:51 PM

Previous topic - Next topic

david

While trying to clean up the metadata scattered throughout image files and sidecars, I'm having trouble with a copyright tag I just can't seem to delete.  I don't know whence it came, but all my efforts to remove it have failed.  It looks like this (exiftool -a -G -copyright filename.jpg)

[EXIF]          Copyright                       : © 2014 by ..., all rights reserved
[XMP]           Copyright                       : © 2014 by ..., all rights reserved (Photographer) - [None] (Editor)
[XMP]           Copyright                       : x-default


Only the first one is correct.  I've tried deleting all, using exiftool -m -P -a -Copyright= filename.jpg, it still shows

    1 image files updated


but then I check again exiftool -a -G -copyright filename.jpg and get

[XMP]           Copyright                       : © 2014 by ..., all rights reserved (Photographer) - [None] (Editor)


If I add a group number  exiftool -a -G1 -copyright filename.jpg, I get


[XMP-exif]      Copyright                       : © 2014 by ..., all rights reserved (Photographer) - [None] (Editor)


but if I try to delete using the more specific form -XMP-exif:copyright, I get told the tag 'xmp-exif:copyright' doesn't exist.

Any suggestions?

ryerman

Quote from: david on January 12, 2017, 05:51:51 PM
....but if I try to delete using the more specific form -XMP-exif:copyright, I get told the tag 'xmp-exif:copyright' doesn't exist.
Any suggestions?

I'd try -XMP:copyright
Windows 10 Home 64 bit, Exiftool v12.61

StarGeek

You might try re-writing all the xmp data, then try to remove the copyright tag.
exiftool -xmp:all= -tagsfromfile @ -xmp:all
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Hi David,

Whatever wrote this tag wasn't conforming to any known specification.  The XMP Copyright tag belongs to the tiff namespace, not exif.  StarGeek's suggestion will work to delete any XMP tag not defined in ExifTool.

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

StarGeek

Ahh, since that's the case, I'd advise testing the command out first.  If there's one improper tag, there might be more that you actually want to keep. 

Phil, would something like "-xmp:all<xmp:all" write tags into their proper places if this was the case?
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Quote from: StarGeek on January 13, 2017, 11:42:25 AM
Phil, would something like "-xmp:all<xmp:all" write tags into their proper places if this was the case?

Actually, I have to take back what I said.  You specified -xmp:all in your command, which is the same as "-xmp:all<xmp:all", and will move the tag into the proper namespace as you mention.  (I was thinking of -all:all when I made my comment, which would try to write back to the same namespace.)  But if the tag name isn't defined in XMP then it would still be deleted.

@StarGeek: You were already one step ahead of my on this one. :)

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

david

Thank you for taking the time to think about this.  Unfortunately, this didn't seem to help;
Pre: exiftool -a -copyright file.jpg

Copyright                       : © 2014 by ..., all rights reserved
Copyright                       : © 2014 by ..., all rights reserved/CC-BY-NC-ND (Photographer) - [None] (Editor)
Copyright                       : © 2014 by ..., all rights reserved


Try to clean using the suggestion exiftool -m -P -xmp:all= -tagsfromfile @ -xmp:all file.jpg (added -m -P)


    1 image files updated


Post: exiftool -a -copyright file.jpg

Copyright                       : © 2014 by ..., all rights reserved
Copyright                       : © 2014 by ..., all rights reserved/CC-BY-NC-ND (Photographer) - [None] (Editor)


Trying to get more detail using -G and -G0 shows the first entry as EXIF and the second and third as XMP; specifying -G1 shows
Before:

[IFD0]          Copyright                       : © 2014 by ..., all rights reserved
[XMP-exif]      Copyright                       : © 2014 by ..., all rights reserved/CC-BY-NC-ND (Photographer) - [None] (Editor)
[XMP-tiff]      Copyright                       : © 2014 by ..., all rights reserved


After:

[IFD0]          Copyright                       : © 2014 by ..., all rights reserved
[XMP-tiff]      Copyright                       : © 2014 by ..., all rights reserved/CC-BY-NC-ND (Photographer) - [None] (Editor)


Phil Harvey

Interesting.  Could you email my the original file so I can look into this?  My email is philharvey66 at gmail.com

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

david


Phil Harvey

Right.  After reading your thread more carefully I see that you want to delete the XMP Copyright completely, not just move it to the proper namespace.  I can do this with the file you sent like this:

exiftool -xmp:all= -tagsfromfile @ -xmp:all --copyright FILE

This will also clean up a bunch of other XMP tags in the wrong namespace.

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

david

Phil,
Thanks, that worked!  Once I managed to type it in correctly ...

Can you break down for me what it's doing?  I like understanding things when I use them...

StarGeek

-xmp:all=
Remove all XMP tags

-tagsfromfile
Copy tags from a file

@
The file to copy tags from.  In this case the @ indicates the same file currently being processed.

-xmp:all
The tags to copy by the -tagsfromfile option.  In this case, all the XMP tags are going to be copied back into the file into the preferred location.  This would copy XMP-exif:Copyright into the preferred location of XMP-tiff:Copyright
except...

--copyright
Do not copy the Copyright tag.  The double dash at the start of this option negates the copying of this tag.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

david

Thanks!  So exiftool knows to copy the tags from the current file (@) before deleting them (-xmp:all=) even though the latter comes first.  Obviously, since it works ...

Phil Harvey

Not quite.  ExifTool deletes the tags first, but the source of the copy is the original file, not the modified 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 ($).