Metadata Keywords corruption
Gimp corrupts Keyword and subject data. This problem is 100% repeatable.
Tools and versions:
- Gimp 2.10.6 (problem also existed in 2.9.9)
- Linux (Ubuntu 16.04)
- Shotwell 0.22.0
- exiv2 0.25 001900 (64 bit build)
- exiftool 11.01
Start with a clean photo (no metadata tags). I created an example Gimp.jpg Use "exiv2 -pa Gimp.jpg" to display Metadata - Gimp.jpg: (No XMP data found in the file). Import the image into Shotwell Photo Manager and add 3 Tags to the image, (Tom,Dick,Harry). The image is now searchable within Shotwell (and other Photo Managers) using any of the 3 Tags (Keywords). Examine the file again using "exiv2 -pa Gimp.jpg".
Exif.Image.Software Ascii 16 Shotwell 0.22.0
Iptc.Application2.Keywords String 4 Dick
Iptc.Application2.Keywords String 5 Harry
Iptc.Application2.Keywords String 3 Tom
Iptc.Application2.Program String 8 Shotwell
Iptc.Application2.ProgramVersion String 6 0.22.0
Xmp.dc.subject XmpBag 3 Dick, Harry, Tom
3 Separate Keywords exist, one for each tag (Tom, Dick, Harry) in alphabetical order, Also subject exists as XmpBag containing 3 items (3 Dick, Harry, Tom).
Open the image using Gimp and simply overwrite (File Overwrite Gimp.jpg)
Examine the file again using "exiv2 -pa Gimp.jpg". The output is now much more comprehensive but check the Keywords and subject fields.
Iptc.Application2.DateCreated Date 8 2018-09-09
Iptc.Application2.Keywords String 4 Dick
Iptc.Application2.Program String 8 Shotwell
Xmp.dc.subject XmpBag 1 Dick, Harry, Tom
Now there is only 1 Keyword, The first in the previous alphabetic list and the subject contains only 1 item which is a comma delimited string. This is not the same as previous.
The correct state can be restored using exiftool:
$exiftool -sep ", " '-Keywords<Subject' '-Subject<Subject' Gimp.jpg