Photo Gallery gives you the ability to mark a person's face and apply a tag to it. I understand it inserts tags directly into the file rather than store it off in a database or accompanying metafile anywhere.
So if that's true, what data is it inserting and how is it formatted?
When possible, Windows Live Photo Gallery uses XMP to write metadata to picture files. See Metadata and the Windows Vista Photo Gallery for details.
Here's the code I wanted. It's in C#.