They should do this in DC! http://t.co/g2jAlDya.
Ben's Blog (92)
Lisa's Blog (47)
British Food (7)
Cape Town (4)
Fundu Lagoon (4)
Good Earth Tours (6)
Intrepid Overland (17)
Just For Fun (7)
Michelin Star (5)
Monterey Bay Aquarium (5)
Mountain Biking (12)
San Francisco (5)
Search Engine Optimzation (SEO) (4)
Serengeti National Park (4)
The Sea Nettle Jelly (6)
Travel Woes (4)
Windows Imaging Component (10)
Windows Live (9)
Mar 2012 (1)
Jan 2012 (1)
Nov 2011 (2)
Aug 2011 (2)
Jun 2011 (1)
Feb 2011 (1)
Jan 2011 (13)
Dec 2010 (20)
Nov 2010 (12)
Oct 2010 (4)
Aug 2010 (5)
Jun 2010 (4)
May 2010 (2)
Apr 2010 (7)
Mar 2010 (5)
Feb 2010 (1)
Jan 2010 (3)
Nov 2009 (8)
Oct 2009 (4)
Sep 2009 (4)
Jul 2009 (6)
Jun 2009 (5)
May 2009 (7)
Mar 2009 (1)
Feb 2009 (5)
Jan 2009 (7)
Dec 2008 (6)
Oct 2008 (3)
Sep 2008 (3)
Aug 2008 (9)
Jul 2008 (3)
Jun 2008 (1)
RSS & Atom Feeds
Understanding how Windows Live Photo Gallery’s People Tags are Stored
Windows Live Photo Gallery
Windows Imaging Component
tags have been an important part of my workflow. For as long as I can remember I have been using Microsoft’s Digital Image Pro 2006. With the release of the new version of
Windows Live Photo Gallery
(WLPG), I took this Christmas the time to switch over and take advantage of some of the cool new features.
The most compelling new feature for me is the new
capabilities. Not only does it store who is in a photo but also where they are. Unfortunately there’s no real standard for where to store people, let alone their location in the picture. Facebook does something similar but doesn’t store it in the photo and most applications just store the name in a keyword or the People XMP field. So the decision was made to store this in a private XMP namespace, which at least provides a standard way of accessing the data. The good news is, Microsoft channels lots of this thinking through a single group, so Windows 7 also uses the same format.
In this posting, I’m going to explain how the data is stored and what it is.
How is this data stored?
it’s possible to see how the data is store in XMP. When people are tagged in the file, WLPG will create a RegionInfo Struct which you can see below:
Which will then contain one or more Regions:
Each Region containing up to four string values:
It’s possible for a combination of these strings to be in each region depending on how much data you’ve given WLPG. There’s a couple of scenarios I have encountered to far:
Descriptive Tag migrated to People Tag but person not identified yet.
Person identified but they are not in your address book
Person identified, they are in your address book but not in your Windows Live network
Person identified, they are in your address book and in your Windows Live network
Face detection found 1+ person but no one identified, so no data will be saved for any person.
2+ people found using face detection with 1+ person identified in the photo. This is what you’ll see for the person not identified.
There’s some more permutations that I haven’t documented but this explains most of the ones I have encountered.
So what is the data?
Rectangle and PersonDisplayName are the two fields that we really care about. Here’s what they look like in WICExplorer:
PersonDisplayName is pretty obvious, it’s the name you specified in WLPG.
Rectangle is four decimals stored in a comma delimited string. They represent the scale-invariant portion of the region in the file. That might sound like a mouth full but it’s pretty straight forward to use, it’s basically the percentage position of the rectangle in the file, plus the height and width.
So a file of size 1000 x 1000 with a rectangle of 0.1, 0.1, 0.2, 0.2 would represent a rectangle with the top left point at 100, 100 with a width and height of 200. If you take the example data above you’d get a rectangle that nicely covers my Dad’s face. It’s ~45% of the way across the photo and ~24% down:
PersonEmailDigest & PersonLiveCID are also kind of obvious but I don’t believe they are usable by anything but WLPG. PersonEmailDigest is the email address of the person encrypted by WLPG, I may be wrong but I don’t think you can decrypt this yourself. PersonLiveCID is the unique ID generated for everyone with a Windows Live ID, it might be possible to use this and I’ll be playing with some of the Azure Services sometime to see if you can resolve this to a contact. That could create some very interesting possibilities.
That’s it for now, in my next post I’m going to explain how to use Windows Imaging Component to read and use the data.
Oh and in the interests of full disclosure, I am a Program Manager in Windows Live but I don’t work on WLPG directly. So 90% of the information below I worked out by playing with WLPG and WICExplorer. The WLPG team were very helpful in answering some questions I had that helped round out my research.
This website, all photography & other content is Copyright © Ben Vincent. Unauthorised use of images is strictly prohibited.
Last Updated: Thu, 15 Dec 2011, 00:30:58 | Website Version v4.0.4138.41239 | Content v7.002