Exiftool not removing data

Started by StarGeek, July 24, 2012, 03:45:07 PM

Previous topic - Next topic

StarGeek


Every now and then, I come across some tag that I can't get Exiftool to remove unless I explicitly clear the tag.  Normally I'll just work up a command to deal with it but this time I thought I'd ask about it.

In this case, I've come across some files with "[IPTC]By-line : Picasa 2.0", so I try to remove it from all the files in the directory with
exiftool -P -overwrite_original "-by-line-=Picasa 2.0" <dir>
(under windows and using Exiftool 8.97)
Except this doesn't work.

So I'm just curious if there's something weird with the file or if I'm doing something wrong.  I'm sending you a copy of the file, Phil, to check it out.  If you can't get to it, no worries, I just thought it was odd.
* 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

Thanks for the sample.

The problem is due to an incorrectly written IPTC string value.  Picasa has added a null terminator after the string, which is incorrect according to the IPTC specification.  ExifTool has been patched to tolerate this incorrect behaviour by removing null terminators when reading, but it seems I need to also patch the code that does the conditional deletion.  This patch will appear in version 8.98.

Picasa really is one of the worst pieces of software out there when it comes to writing metadata.

- 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

To quote Zoidberg:  "Hurray, I'm useful."

Thanks, as always, for such a great piece of software and the amazing speed in which you update it.
* 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).

StarGeek

I've noticed the same behavior in some [File]Comment tags.  A specific example is when I use
ExifTool "-comment-=File written by Adobe Photoshop¨ 4.0" <dir>
no files get changed, but when I use
ExifTool -E "-comment-=File written by Adobe Photoshop¨ 4.0&#x00;" <dir>
the comments get removed.

This is using version 8.99.

I can send you an example file if need be.
* 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

Thanks!

I have been able to reproduce this.  Again, the JPEG COM data isn't supposed to be null terminated, but I will add a patch for this too.

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