The Dark Side of Tagging in Windows Vista

by bob on April 10, 2007

I don’t want to rain on everybody’s parade, but there is a really significant fly in the ointment when it comes to the gee-whiz media tagging feature in Windows Vista’s Photo Gallery application.

The idea behind tagging photos and other media files is compelling: you can instantly filter non-textual content by keyword. Photo Gallery in and of itself is primarily an organizing and viewing application with some very basic photo editing features, but is capable of launching other applications that have registered themselves with Vista as knowledgeable about the particular file type you’re working with. For example, we have Adobe Photoshop Elements 5.0 installed, and when you highlight a jpeg image, Photo Gallery is smart enough to have “Edit with Photoshop Elements” on the image’s context menu. Cool.

But think carefully about how you’ll use this coolness, long-term. Consider: you will, over time, tag and organize potentially thousands of files. What happens when you migrate to another system? And what if you need to tag and organize the same media in other applications, such as Elements? Over time, you’re going to make a substantial work investment in getting everything organized. You’re going to get very dependent on tagging, and you’re not going to want to lose that investment every time you work with a different image editor or buy a new computer.

There are two ways to store metadata (data about data) such as tags. One is to use a database of some kind to track what tags go with which files (to associate tag(s) with each file location). The other way is to embed the tags directly in the image files themselves.

In an excellent screencast, Jon Udel interviewed one of Photo Gallery’s product managers to show how tagging works in Photo Gallery. Jon has pushed the concept of “The Truth is in the File“. Unlike, say, the Mac, which keeps tags in a database, Photo Gallery keeps them in the files themselves. That way, when you move the files to a new machine, or upload them to the Internet or share them with others, the tags stay with the file.

Or do they?

The answer is, sort of, usually, provided that certain conditions are met.

Let me explain.

While it’s true that Photo Gallery stores your tags in the file, it takes quite a bit of time to update image file metadata. Sometimes a (potentially huge) image file must be completely or partially rewritten. The actual image data is never molested, but room must be made for more metadata and this can mean time-consuming copying of the file to a new “version”. This is all transparent to the user, even to the point that the operating system “last modified” date doesn’t change. However, were you to tag, say, a thousand photos at once, you’d have a long wait for all those files to be updated.

So Photo Gallery actually tracks the files internally in a database. That way you get instantaneous performance: add a tag to a thousand jpegs, and it happens, boom, just like that. But if you were to pay close attention to the lower left corner of Photo Gallery’s UI, you’d see a tiny icon that indicates Photo Gallery is working in the background to update that thousand files while you continue to do other things.

If you were to quit Photo Gallery before it was done with this background update, it will resume its work the next time you load it.

This works great, for a specific use case: (1) You will use Photo Gallery exclusively to organize your photos; (2) all of your photos are in a format (such as jpeg) that support embedded metadata; (3) you are willing to limit yourself to Photo Gallery and its descendants plus whatever other applications may (or may not) happen to evolve to be Photo Gallery-compatible in the future.

The first problem is, how does Photo Gallery recognize that a file has metadata that needs to be in its database? The answer is, if you use Photo Gallery to import photos from your camera, Photo Gallery will read existing camera metadata into its database; if Photo Gallery encounters a photo that it has never seen before somewhere in the directories it scans, it will add any existing metadata to its database; and of course, if you manually tag a file, that goes into the database.

However, in my experience at least, if some other application updates a file, Photo Gallery will not notice. So if you tag a file in Elements, or copy a new version of the file that is tagged differently from another machine, Photo Gallery will not (or at least often does not) notice. Now you have the interesting situation where a photo has a tag that Photo Gallery doesn’t know about. You can’t find it using a tag search in Photo Gallery.

If you bring up that file in Windows Explorer, and look at the file properties, the new tag is there. In fact, if you launch that file in Photo Gallery from Explorer, the new tag is there. But the new tag does not appear in the tag list of Photo Gallery and cannot be used to find the file in Photo Gallery. Clearly the internal database is out of sync with the file. When launched to view a single file (from Explorer, for instance), Photo Gallery actually bothers to read the tags from the file and display them all, apparently ignoring its internal database, and not updating it with the file’s new info, either.

The only way I can figure out to fix this is to rename the file, or copy it to some directory that Photo Gallery doesn’t scan, delete it from Photo Gallery, then throw the saved copy back into its old location. Anything to make it look “new” to Photo Gallery. Not exactly a recipe for getting work done quickly!

It gets worse. Just because you tag a file in another application doesn’t mean that Photo Gallery would ever see it. That’s because for some applications, “the truth is in the database”, not the file. They don’t even update the file.

Adobe actually originated the metadata format that both Elements and Photo Gallery use, but Elements does not actually write the metadata to the file unless you tell it to using File | Write Tags to File. In other words, Elements, for all its features, lacks Photo Gallery’s background update functionality, so tagging is a two-step process: tag one or more files, then explicitly tell Elements to write those tags to the files. Guess how often you’re going to forget that.

Of course, even if you remember to write the tags to the files, it’s at best questionable whether Photo Gallery will ever see the change. At this point in my experimentation, I’d say most of the time, not — unless you take still more clumsy and error-prone steps to force it to notice.

The fix for this would be for Photo Gallery to either have a background process for scanning continuously through files it has in its database, looking for tagging changes, and resolving differences; or for Photo Gallery to use some sort of FileSystemWatcher to respond in real time to writes to files in its catalog that are not done by Photo Gallery itself.

Even better, both the background checking and background writing of database changes to files should probably be abstracted out into separate Windows services so that this activity can go on whether or not Photo Gallery is actually running. Hopefully this can be on a low enough thread priority that it does not contribute to slow system performance, so that everyone turns those services off when tuning their machine, like they do today for file indexing in Windows XP.

Perhaps what we have in Photo Gallery is some trimmed-down functionality due to the cancelled WinFS initiative. I don’t know, but I’ll tell you one thing: the first image manipulation software, such as Elements, that solves these problems will win lots of customers.

{ 5 comments… read them below or add one }

Elja Trum April 22, 2007 at 4:04 pm

Interesting observations.
I noticed the normal Windows Vista search doesn’t find the tags I added in the Photo Gallery. Do you think this could be because of the same problem? Do I need to keep Windows Photo Gallery running for some time before it has written all the tags to the files and has indexed the files with tags in the normal Vista Search?

Bob responds: I haven’t had time to assess Vista Search yet, especially in relation to tags, but if I recall correctly, it is configured “out of the box” to just search file names, not contents. My guess is, you will have to configure Vista search to look at tags; but it should be capable of it. If I get a chance to delve into this, I’ll update this response. Regarding Gallery’s background tag writing — If you shut Gallery down before it’s finished updating files, it’s supposed to resume any unfinished file updates the next time you fire it up.

Elja Trum April 23, 2007 at 2:15 pm

Thanks for your response, Bob.
I’ve changed the indexing options to index properties and file content. This seems to work a bit. I can find some images that are tagged with their tags. Most tags I’ve assigned don’t seem to work. Perhaps the indexer needs more indexing time, but it claims ‘indexing complete’.

Patrick Murphy June 16, 2007 at 9:14 pm

There are many limitations to current tagging implementations. Some observations/suggestions…

Tags should be part of the image file (WPG got that right), and in a standard format so they are readable by many applications. Also, so they are not written over by potentially incompatible applications (“my tags are better than yours”).

Tags should be hierarchical (again, WPG got it right); for example, Animals.Air.Raptors.Falcon.

Tags should be importable/exportable as simple text database files. This way, if I develop a tag system which works for my organization, I can easily give it to others. Also, I could work on the tag categories “offline” using a text editor, instead of within the photo application which generally has multiple steps to create a tag.

Just as there are image format conversion utilities, there should also be tagging conversion utilities that go from one system (e.g., iMatch or Picasa) to another (e.g., WPG). This way, the 10,000 images I tagged using iMatch or Picasa or whatever would retain their tags if I switch to another system (or if a univeral tagging standard format is developed).

A tagging system should have a way to have a LOT of tags visible at once. I currently have over 500 tags. A single photo may get 5-10 different tags. It is very inefficient to scroll down a single vertical list to find 5-10 tags out of 500, per photo. Much better to have multiple columns of relatively small type, so many more tags are visible at once. Even better would be an intelligent system where the most recently used tags are collected at the top of the columns.

I currently use an application (Pixort) whose sole purpose is grading and culling photos. I’d love to have a similar app whose sole purpose is tagging photos, so the process could be streamlined and made easier than picking from a humongous unorganized alphabetical list. Is anyone listening?

Bob responds: I would pay good money for the kind of functionality you are talking about here.

Barry July 14, 2007 at 6:13 am

One way of getting Vista/Photo Gallery to recognise the tag changes is to delete or rename the database file which forces it to re-read all photo information… It not quick and it’s not something that you could do regularly, but it does work.

The database file is at C:\Users\UserName\appdata\Local\Microsoft\Windows Photo Gallery and is called pictured.pd4

Substitute the user’s name for “UserName” in the above path.

Barry

Thorsten August 7, 2007 at 11:10 am

Thanks Barry, that worked fine – just as you said it took some time, and only the tags were done, all changed and edited images are still there. I’ll do this every now and then :)

Leave a Comment

Previous post:

Next post: