Metadata and the Windows Vista Photo Gallery

If you have ever applied a tag to a photo, given it a star rating, or changed the date or time it was taken, you’ve edited the metadata on the photo. The term metadata literally means “data about data”. Your photos are considered “data”, so metadata about your photos is simply information that further describes your photos.

The Windows operating system has always had mechanisms for storing and displaying metadata. For example, here is some of the information available for photos in Windows XP:

  • File Name
  • File Size
  • File type
  • Date last modified
  • Etc.

Windows Vista makes some improvements to the metadata system for photos. For example, here is some of the new information available in Windows Vista:

  • Tags
  • Date Taken
  • Rating
  • Caption
  • Image Resolution
  • Camera make/model
  • Shutter speed
  • Etc.

Some of this information is written to the photo by your camera (e.g. shutter speed, date taken, camera make/model). Some of it is added by you in an application like the Windows Vista Photo Gallery (e.g. tags, captions, and ratings).

In the past, you may have used third-party image management applications that allowed you to add tags (or other metadata) to your photos, only to find out later that those tags were locked in a private database that only that application could read. This makes it inconvenient to share your photos (or back them up), since the metadata didn’t travel with the file. In Windows Vista, our goal is “the truth is in the file”. That means that metadata you apply to your photos is part of the photo, and available to any application that knows how to read it. But how do we accomplish that?

EXIF, IPTC, and XMP – oh my!
There are a number of competing standards for imaging metadata. That is, different ways of reading and writing metadata for photos. One of the biggest standards, EXIF, is commonly written to photos by most cameras, but has many limitations. It’s somewhat antiquated, fragile, not very flexible, and doesn’t support international languages like Japanese very well. IPTC is a standard that is used pretty widely in journalism applications, but is undergoing a transformation towards an XMP-based system.

XMP is an extensible framework for embedding metadata in files that was developed by Adobe, and is the foundation for our “truth is in the file” goal. All metadata written to photos by Windows Vista will be written to XMP (always directly to the file itself, never to a ‘sidecar’ file). When reading metadata from photos on Windows Vista, we will first look for XMP metadata, but if we don’t find any, we’ll also look for legacy EXIF and IPTC metadata as well. If we find legacy metadata, we’ll write future changes back to both XMP and the legacy metadata blocks (to improve compatibility with legacy applications).

Hurry up and wait
It can be time consuming and resource intensive to read and write large image files. Because of this, The Windows Photo Gallery does all of its file activity in the background. When you query or tag photos in the Gallery, the instantaneous performance you’re seeing is the result of a database that caches metadata to provide a fast user experience.

Although you’re able to tag thousands of photos and move on immediately, the reality is that those files will slowly be updated in the background. If you have tagged a bunch of files, those tags will not be visible to other applications until the Gallery has finished writing to those files. There is a small indicator in the bottom left hand corner of the application to let you know what the Gallery’s metadata read/write status is.

Hover your mouse over the small blue icon below the tree when it appears to see a tooltip with the following information:

  • Number of tag updates remaining (how many files the Gallery needs to read tags/metadata from)
  • Number of file updates remaining (how many files the Gallery needs to write tags/metadata to)
  • Number of thumbnail updates remaining (how many thumbnails the Gallery needs to generate from files)

When the little blue icon disappears, it means the Gallery’s database and the file system are in sync. If you still run into files that are out of sync…

Your mileage may vary
Although our goal is for “truth in the file”, we know that we won’t be able to achieve it 100% of the time for all files. There are some cases where metadata writeback is impossible, so we do the best that we can. Some of the cases where we can’t write back metadata include:

  • Insufficient permissions to write to the file
  • File type (or codec) doesn’t support metadata writeback (e.g. BMP, PNG, GIF, MPEG, etc.)
  • Corruption in the file (badly formed metadata, etc.)
  • File is locked for writing by another application

In these cases, the Photo Gallery will write the tags (or other metadata) to its own database, but since it is not in the file, other applications (and other parts of Windows) will not have access to the metadata. Other parts of Windows (e.g. Explorer, the Photo Viewer) may not allow you to write back metadata at all if it cannot be written to the file immediately.

The Gallery does retry writeback operations several times before giving up. Every time the Gallery starts up, it will retry files that it couldn’t write in previous sessions. So if you discovered that your tags weren’t getting written back to your files because they were marked read-only, simply clear the read-only flag, and restart the Gallery. This should cause all of your tags to get written to your files.

We will be posting more extensive documentation on MSDN in the coming weeks. Watch this space for an update!

– Scott Dart (Program Manager)

Comments (23)

  1. Scott Dart, Program Manager for the Photos and Imaging Experience Team, discusses several major metadata…

  2. Wictor Wilen says:

    Scott Dart (Program Manager) has a good blog post on Metadata and the Windows Vista Photo Gallery.

  3. We’ve received a number of great questions and feedback from the metadata blog post last week. Since…

  4. David B says:

    Will there be any compatibility between the tagging systems of Windows Vista Photo Gallery and MS Digital Image Suite (2006) Library ? An import from pictures.pd3 would be nice…

    Thanks for any hint regarding this question,


  5. I’ve been reading that Vista adds it’s tagging data directly to the file (here and here). I tagged some…

  6. kasper says:

    Will the Vista Photo Gallery observe pre-defined IPTC fields or will all tags be written into the standard keyword field?

    For instance if I have a "places" category, with underlying countries, cities etc. Will this information about the recording location of my shots go straight into the keyword field of IPTC (or XMP for that sake)

    Or will the pre-defined IPTC (or XMP) fields for this be used? They are already divided into seperate fileds by "Country" -> "State" -> "City" -> "Location". By following this standard – and putting the information in the right fields – searching could be made better – and there would be less clutter in the keyword field.

  7. Although we talk a a lot about the Windows Photo Gallery, the photo experience in Vista also includes…

  8. Photo Metadata APIs A few months ago, we blogged about how metadata was handled by the Windows Vista

  9. JD on EP says:

    Vista XMP: Ed Bott at ZDNet reports on "Vista’s Three Killer Features", and one of these is the ability to embed metadata within photographs and to use this information when sorting or processing files. They use the Extensible Metadata Format to directly

  10. CeMax says:

    Have you read this topic related to the great "exiftool"?

    There are a lot of interesting things to know about xmp tags used by Vista.

  11. minimice says:

    Hey guys, not sure if you know about this, but you can use this software called Quick File Rename to extract XMP tags and put them into the names of your photos. It also supports IPTC, Exif and the properties summary tab attributes. See

  12. trekker says:

    hey guys, saw this cool thread to extract meta data from jpeg files and wanted to share.Thanks

  13. dhcmrlchtdj says:

    Please take PNG and GIF off the list of formats that don’t support metadata writeback. Adobe has formally defined and <a href="">documented</a&gt; embedding schemes to store XMP packets within PNG and GIF89a files, so there’s no excuse for not supporting those formats.

  14. sony-alpha says:

    Thank you very much. this site has provided me with an understanding of Metadata and the Windows Vista Photo Gallery

    , It’s just what I was looking for!