[Digikam-users] Transferring images with XMP sidecar files / GIMP Warning

Jean-François Rabasse jean-francois.rabasse at wanadoo.fr
Sun Feb 3 22:02:20 GMT 2013

On Sun, 3 Feb 2013, Christoph Siedentop wrote:

> Secondly, insert the data into the image:
> exiv2 insert -i X *
> So, this does insert (obviously), -i X means, use xmp. * means
> run on all images in the folder.
> No need to manually change the xmp files.
> I hope this helps at least one person.

Hello Christoph, thanks for the hint.

I'm not used to command line exiv2 because of serious problems in the
past (support for Nikon makernotes awfully broken), so I gave the exiftool
variant. But yes, any metadata management program should be able to do 
that of processing.
(And recognizing either xml or xpacket format is a plus, indeed.)
And I agree with you, this kind of trick could help, probably more than
one person, for one day or the other we have to face related problems.

On Sun, 3 Feb 2013, Peter Albrecht wrote:

> Hello Jean-François,
> thanks for the warning!
> (Gentoo stable GIMP is currently 2.6.12 ; )

Good, but beware of your next O.S. update :-)
I was using GIMP 2.6 too, until recently, and I've to admit the 2.8.2
is great. Except for that silly metadata problem.
(Version 2.8.2 is great, the 2.8.0 coming with my OpenSuse 12.2 is
buggy, I've recompiled 2.8.2 from sources package.)

> My workflow (to keep atleast the important metadata):
>    1. Import JPG to DigiKami
>    2. Tag / Rate / Assign Caption (-> stored in file and DigiKam DB)
>    3. Edit with GIMP (tested: explicit Saving without Metadata)
>    4. all Metadata in the file is gone : (
>    5. in DigiKam click "Write Metadata to Image"
> This way, at least the metadata (most important to me) is kept:
> Tags / Ratings / Captions
> But you would loose: Exposure, Focal, Aperture,... (Although
> this data is imported to the DigiKam DB, it seems to not being
> written back to the image).

Be aware that if you uncheck the « Save metadata », GIMP will update
neither the XMP section nor the Exif section, so you loose all.
Probably it's better to Save with metadata, at least you'll get a valid
Exif section (with the image thumbnail) and a broken XMP section.
And you can then, at your convenience, re write metadata from DK, or
from a saved XMP record, exiftool or exiv2 as Christoph said above.

> So best way, of course, would be to try not loosing the EXIF
> data in the image. ; )

Sounds wise :-)
And probably (or certainly), the safest is to export all and archive
metadata, Exif, XMP et al., along with the image file.
I use exiftool again :
  exiftool -X Image-file
The -X option exports all, JFIF, Exif, XMP, Composite, etc., and even
non standard XMP schemas (as I use non standard metadata, I have
personal XMP namespaces) under a XML format.
I like XML because it's a rock solid data format and I bet such files
will still be useable in 10 or 20 years from now. At least it would ever
be possible to custom any XML parser and recover data.
This, of course, in case of accident.

Also, note that you should consider using Digikam in both writing modes,
« Save metadata to image file AND sidecar file »
The sidecar files format is really complete and you have your XMP data
but also a subset of the most important Exif data, Exposure, Aperture,
Focal length, Creation date, ISO settings, GPS info if any, Camera maker
and model, etc.
So the sidecar file is also a good candidate for data archiving for
a long lifetime.
(And it's 3 to 4 Kbytes, so compared to the size of images files, it
won't explode your archives drives :-)

On Sun, 3 Feb 2013, Volker Henn wrote:

> Dear Peter,
> do you really overwrite the original JPG file?

Hem, shall I dare say I do :-)
(At least my working copy, the original as out of the SD is on a USB drive
and will be removed months later, when I archive final images folders.)


More information about the Digikam-users mailing list