Ensuring Your DigiKam Tag Hierarchy Is Stored in File Metadata
I’m scanning and organizing my photo collection and I’ve discovered some important principles to follow in tagging them.
First, I want to make sure that all the important metadata is stored in the photos themselves, rather than solely in the DigiKam database. This ensures that I can open or manipulate my photos in any application without losing the effort I’ve put into organizing them. DigiKam can easily be configured to do this seamlessly in the background, but there are some implications for the decisions I make about file formats and tags:
1) I had to convert many files from .tif to .png. DigiKam can’t store metadata in .tif files. PNG is good because it is lossless and open.
2) The way that tags are presented in DigiKam is not quite the way they are stored in the Keywords metatags. DigiKam shows a hierarchy of tags as if the tag format were stored as level1/level2/level3. In the actual metadata which other applications (like Nautilus) use, it looks like the tags are stored as a comma-separated list: level1, level2, level3. This becomes a problem when you have multiple nested tags attached to the same image because a comma is also used to separate the lists of nested tags i.e. level1a, level2a, level3a, level1b, level2b, level3b. If you create nested tags with the same names, they will get mixed up when you try to recreate the tag hierarchy in some future application (or when another user tries to use DigiKam to look at your photo archive — which is how I discovered this).
Here is an example of what I mean: let’s say you have a photo which was taken of your friend Bob at your other friend Jennifer’s birthday party. You want to tag the photo so that you know who is in it and where it was taken. You create a tag tree like “people/friends/Bob” and another “events/birthday/Jennifer”. In DigiKam, you can now pull up this photo either with all Bob photos or all Jennifer’s birthday photos. This would be fine if you don’t also have “people/friends/Jennifer” or “events/birthday/Bob” tags. When DigiKam or another application tries to recreate the tree (or just tries to use the tags without imposing a hierarchy), your photo tagged “people, friends, Bob, events, birthday, Jennifer” will potentially look like a photo of Jennifer at Bob’s birthday party which means I’ll never find that photo when I want to see it later.
The solution to this? Make sure every tag makes sense by itself, even without its tree context, and is unique. In the above example, I would create tags “people/friends/Bob” and “events/birthday/Jennifer’s Birthday”. I would also select the “Toggle Auto/parent” option, which will ensure that when you pick a sublevel tag, all of the superior levels will also be selected.
If you want to check what is actually being stored in your photo files, the following command is helpful:
If you check, you’ll see that there’s an “Xmp.digiKam.TagsList” metatag which stores the tags using slashes to separate the tree levels, but the other keyword tags “Iptc.Application2.Keywords” and “Xmp.dc.subject” separate the tree levels with commas, allowing for the confusion in programs other than DigiKam. In my case, I think the reason that my tags ended up confused is because I didn’t always have all of the parent tags checked, causing the “Xmp.digiKam.TagsList” to contain things like “events, Jennifer, friends, Bob” rather than “events/birthday/Jennifer, people/friends/Bob”
I highly recommend this primer on Digital Asset Management in DigiKam. I found it very helpful in sorting out my thinking about all sorts of issues with DigiKam.
More on photo metadata here.
Using Smugmug as a Photo Backup Location
April 3, 2010 - 12:11 pm
Tags: photo managers, photography, smugmug
Posted in command line, photography, sysadmin | Comments Off
I’ve finally gotten around to uploading my photo collection. I’ve decided to pay for a subscription to Smugmug.com and so far I’m happy with it. I chose not to use Flickr or other options because I wanted a site which I could use as a private one-to-one backup of my personal store of photos. I […]
More digiKam Tagging Quirks
November 4, 2009 - 2:04 pm
Tags: digiKam, metadata, photography
Posted in photography | Comments Off
In my last post, I pointed out that digiKam doesn’t always keep the tag hierarchy straight because of missing parent tags and the format in which the tags are stored in the file metadata. I’ve also noticed that when you move a child tag (with associated photos) within the tree, digiKam doesn’t “clean up” by […]
Display Video Thumbnails in DigiKam
November 3, 2009 - 2:10 pm
Tags: digiKam, images, video
Posted in photography, sysadmin, video | Comments Off
Digikam is working great for me and I’m diligently tagging all my old photos. I was disappointed that, although DigiKam could play them, it wouldn’t display thumbnails for video files in my albums. Turns out that I just needed to install the mplayerthumbnails package and now I have thumbnails. In Ubuntu Jaunty, ignore instructions which […]
And the Winner Is: digikam
October 25, 2009 - 6:47 pm
Tags: images, photo managers, photography, ubuntu
Posted in photography, sysadmin | Comments Off
I’ve decided to proceed using the KDE application digikam. It seems to do everything I want (plus lots more) and is open source and easy to use. It looks like it integrates with various web services, including facebook and flickr, without difficulty. The only disadvantage I can find is that the image editor doesn’t automatically […]
Managing Photos
October 25, 2009 - 4:22 pm
Tags: images, photo managers, photography, ubuntu
Posted in photography, sysadmin | Comments Off
We have too many photographs! I’d like to get them under control so that we can enjoy them now and preserve them for the future. We have a dozen albums and a couple of big boxes of old negatives and prints, including some that I developed myself and a few old family photographs that go […]
Comments are closed.
February 4, 2013 - 7:16 am
Hi,
I am also in the process of sorting my photos (migrating from f-spot to digikam). So i thought i point out some details i figured out to you.
There are at least two toolkits for metadata available in most linux distributions: exiv2 and exiftool.
Usually, e.g. when tagging with digikam or f-spot, the tags are added multiple times. Internally they are a list of tags. Displayed by almost all programs i found, including the tag-pane in digikam, it is always a comma seperated list. There is no difference in display between the tag “foo, bar, baz” and the tags “foo”, “bar” and “baz”. Internally they are treated completely different, just as one might have suspected.
To distinguish you can take a closer look at the output of exiv2, or use the exiftool with the -v option.
Xmp.dc.subject XmpBag 2 foo, bar
Xmp.dc.subject XmpBag 1 foo, bar
The first line is two different tags, “foo” and “bar”, while the second is one tag “foo, bar”, as pointed out by the column telling how many elements are in the XmpBag….
I had to fingure this out, as some software, i can’t tell which, somehow botched my collection, so some of my pictures had multiple tags in one tag-field…