HI Phil,
Somewhere between 11.00 and 11.77 keyword output added a trailing separator. I couldn't find anything in the revision history but could have missed it.
$exiftool -ver
11.00
$ exiftool -keywords 1.jpg
Keywords : a, b, c, d
$exiftool -ver
11.77
$ exiftool -keywords 1.jpg
Keywords : a, b, c, d, <== notice the comma
Was this intentional? Have there been any other recent output format changes?
Thanks
There should have been no change in the keyword output formatting. A trailing "," indicates that there is a blank item at the end of the list. How did you write these keywords? Also, maybe you could send me the file (1.jpg) so I can take a look (my email is philharvey66 at gmail.com)
- Phil
I got the samples. Yes there was a difference between those versions when writing keywords. Older versions didn't allow blank keywords to be written, but newer versions do.
But if you aren't trying to write a blank keyword, then there must be a problem with the command you are using. What command are you using to write the keywords?
- Phil
ProcessBuilder pb = new ProcessBuilder(myExifProgram, "-stay_open", "true", "-@", "-");
-iptc:codedcharacterset=utf8
-overwrite_original_in_place
-m
-sep
;
-IPTC:Keywords=a; b; c; d;
/C/C/Photos/Problems/1.jpg
-execute
The semicolon after the d in -IPTC:Keywords=a; b; c; d; is what gives you the empty keyword. Remove the trailing semicolon and you won't get an empty keyword.
Thanks, I understand. But I think creating an empty keyword should be a little more explicit than a trailing separator that was never previously rejected.
This change was necessary to allow lists to be copied exactly. There are rare use cases where blank entries in lists are significant, and ExifTool needed to support this.
- Phil
OK, thanks for your help.