Author Topic: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files  (Read 7765 times)

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Hi all,
I am a newbie but used exiftool for a few funky things so far. I like the recursive directory capabilities.
I now have a problem with what WLPG has done to my photos. I want to keep the people name tagging, but drop all the connection to the contacts in windows live and facebook.

The raw XMP looks like this:

Code: [Select]
<x:xmpmeta xmlns:x="adobe:ns:meta/">
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
        <rdf:Description rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:MP="http://ns.microsoft.com/photo/1.2/">
            <MP:RegionInfo>
                <rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                    <MPRI:Regions xmlns:MPRI="http://ns.microsoft.com/photo/1.2/t/RegionInfo#">
                        <rdf:Bag xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                        <rdf:li>
                            <rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                                <MPReg:Rectangle xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#">0.310030, 0.322691, 0.291793, 0.218928</MPReg:Rectangle>
                                <MPReg:PersonDisplayName xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#">John Smith</MPReg:PersonDisplayName>
                                <MPReg:PersonEmailDigest xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#">FA2CA53394ED1BA3F1D87E623C475E25A7BC878F</MPReg:PersonEmailDigest>
                                <MPReg:PersonLiveIdCID xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#">2970879003418035256</MPReg:PersonLiveIdCID>
                                <MPReg:PersonSourceID xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#">WL: 5256297087900341803</MPReg:PersonSourceID>
                            </rdf:Description>
                            </rdf:li>
                        </rdf:Bag>
                    </MPRI:Regions>
                </rdf:Description>
            </MP:RegionInfo>
        </rdf:Description>
    </rdf:RDF>
</x:xmpmeta>

The -X output looks like (different example files I know - sorry):
Code: [Select]
<XMP-xmp:CreatorTool>Microsoft Windows Live Photo Gallery 15.4.3508.1109</XMP-xmp:CreatorTool>
 <XMP-MP:RegionRectangle>
  <rdf:Bag>
   <rdf:li>0.468144, 0.187177, 0.076177, 0.056877</rdf:li>
   <rdf:li>0.689751, 0.339193, 0.281163, 0.209928</rdf:li>
  </rdf:Bag>
 </XMP-MP:RegionRectangle>
 <XMP-MP:RegionPersonDisplayName>
  <rdf:Bag>
   <rdf:li>June Stone</rdf:li>
   <rdf:li>May Stone</rdf:li>
  </rdf:Bag>
 </XMP-MP:RegionPersonDisplayName>
 <XMP-MP:RegionInfoMPRegionsPersonEmailDigest>A5002CEF9B68FB176477B0B1D4844A63FC4FFB06A5002CEF9B68FB176477B0B1D4</XMP-MP:RegionInfoMPRegionsPersonEmailDigest>
 <XMP-MP:RegionInfoMPRegionsPersonLiveIdCID>-44650472209500067764465047</XMP-MP:RegionInfoMPRegionsPersonLiveIdCID>
 <XMP-MP:RegionInfoMPRegionsPersonSourceID>WL:-77644650472209500067764465047</XMP-MP:RegionInfoMPRegionsPersonSourceID>

And I just want to drop/delete however many of the following show up:
MPReg:PersonEmailDigest
MPReg:PersonLiveIdCID
MPReg:PersonSourceID

But all the different methods I try keep either deleting everything (even when I tell it to skip tags) or saying that the tag does not exist even when it can print it out.

Now I have read that exiftool can not do that much with custom XMP but with the struct and -hierarchicalkeywords it seems like it must be possible. Or worst case save it out and rebuild it, but I cant work out how to do any of these.

Does anyone know of any ideas for what to try?
Many Thanks
MarkB

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #1 on: July 20, 2012, 05:26:23 AM »
I am still reading up on this. I found this as an option:

Quote
Pass 1) extract all information in structure format (using -struct with either the -json or the -xmlformat output options).
 exiftool -struct -json -regioninfo FILE
 Pass 2) process the structures to add/delete the elements you want, adding dummy elements (with value 'dummy' for example) if necessary to fill in missing elements, then write the new structure elements in order, overwriting the original tags (ie. do NOT use += or -=).
But that case sounds like it may take a while to get right.

And also I am considering just a space replacement for the chars that are in the section I want replaced. This is begining to seem like the quickest and most fail safe option.

MarkB

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14896
    • ExifTool Home Page
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #2 on: July 22, 2012, 07:25:09 AM »
Sorry for the delay in responding.  I was on vacation.

You may delete individual tags from XMP structures with the -TAG= syntax on the command line by specifying flattened tag names on the command line.  See the XMP tag name documentation for a complete list of available XMP tags.  The flattened tags have a "_" in the Writable column.

But the easiest way to determine the tag name is to use "exiftool -a -s FILE".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #3 on: July 25, 2012, 08:44:45 AM »
Phil,
Thanks heaps for the reply. And sorry for not posting earlier, I was relying on getting an email ping when the post was changed.
I confess in that time I wrote a perl script to strip them because I knew that white space would be safe. Obviously I want it written out again properly so I will look into this now.
MarkB
PS I am really impressed with your support level on the tool. Not seem much like it before.

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #4 on: July 25, 2012, 09:03:30 AM »
I will have to do more investigating at home, but a quick point is that I dont know how to deal with structs (I tihnikn I tried the correct flattened name originally) and also the tag page http://owl.phy.queensu.ca/~phil/exiftool/TagNames/Regions.html is missing.
I read elsewhere that nth item in the structure list is hard to idendify and deal with singly. But as I want to strip the same tag from all the entries in the list of structs.
MarkB

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14896
    • ExifTool Home Page
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #5 on: July 25, 2012, 09:06:42 AM »
Hi Mark,

Where did you get this URL?: http://owl.phy.queensu.ca/~phil/exiftool/TagNames/Regions.html

It should be http://owl.phy.queensu.ca/~phil/exiftool/TagNames/XMP.html#RegionInfo

Also, you need to enable notification for the thread or in your account settings to get email notifications.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #6 on: July 25, 2012, 05:16:44 PM »
>Where did you get this URL
Go to http://owl.phy.queensu.ca/~phil/exiftool/TagNames/Microsoft.html#XMP
Under section "Microsoft MP Tags" The links for RegionInfoMP Tags and Regions Tags have broken links.
The link you have is not the MS version of RegionInfoMP as they have these extra troublesome tags in there.

>you need to enable notification for the thread or in your account settings to get email notifications
Yes I thought I had done so but obviously messed up.

Off to do that and to try a few more options.
Thanks.
MarkB

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #7 on: July 25, 2012, 05:52:31 PM »
Phil,
I keep getting to the same point.

C:\Users\Mark\Desktop\Compare>exiftool.exe "2011-06-18 Waddesdon 113.JPG" -RegionInfoMPRegionsPersonLiveIdCID
Region Info MP Regions Person Live Id CID: -836268535149213747

C:\Users\Mark\Desktop\Compare>exiftool.exe "2011-06-18 Waddesdon 113.JPG" -RegionInfoMPRegionsPersonLiveIdCID=
Warning: Tag 'RegionInfoMPRegionsPersonLiveIdCID' does not exist
Nothing to do.

Doing -s -a shows
RegionInfoMPRegionsPersonEmailDigest: 33AD3AEB721F8EFBFE82B2FBAE3BB7605A133011
RegionInfoMPRegionsPersonLiveIdCID: -2606927875756980202
RegionInfoMPRegionsPersonSourceID: WL:-2606927875756980202
RegionInfoMPRegionsPersonEmailDigest: B932D312968B7C7CB42F9B93D6AAFC23A495DDE5
RegionInfoMPRegionsPersonLiveIdCID: -836268535149213747
RegionInfoMPRegionsPersonSourceID: WL:-836268535149213747

-struct shows

RegionInfoMP                    : {Regions=[{PersonDisplayName=Mark B,PersonEmailDigest=33AD3AEB721F8EFBFE82B2FBAE3BB7605A133011,PersonLiveIdCID=-2606927875756980202,PersonSourceID=WL:-2606927875756980202,Rectangle=0.413086|, 0.152717|, 0.128906|, 0.193833},{PersonDisplayName=Jacqui B,PersonEmailDigest=B932D312968B7C7CB42F9B93D6AAFC23A495DDE5,PersonLiveIdCID=-836268535149213747,PersonSourceID=WL:-836268535149213747,Rectangle=0.590820|, 0.243759|, 0.127930|, 0.193833}]}

Any suggestions?
MarkB

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14896
    • ExifTool Home Page
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #8 on: July 25, 2012, 07:50:14 PM »
Hi Mark,

Thanks.  I understand now.  It looks like I need to fix the broken documentation for the Microsoft MP RegionInfo structure.

To date, I have only seen Rectangle and PersonDisplayName in this structure, so the other elements you posted are new to me.  As such, ExifTool can not yet write (or delete) them.  I will add support for these to ExifTool 8.98, and also fix the documentation.

Thanks for pointing this out.

If you know of any more elements in the MP Regions structure other than PersonDisplayName, Rectangle, PersonEmailDigest, PersonLiveIdCID and Rectangle, please let me know.

- Phil

Edit: Sorry for being so dense and catching on so slowly -- I didn't have much time to spend on this the first time around.
« Last Edit: July 25, 2012, 08:56:09 PM by Phil Harvey »
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #9 on: July 26, 2012, 05:57:43 AM »
>If you know of any more elements in the MP Regions structure other than PersonDisplayName, Rectangle, PersonEmailDigest, PersonLiveIdCID and Rectangle, please let me know.

Ok so even MS dont have the namespace link working (sigh).
http://ns.microsoft.com/photo/1.2/t/Region#
so why do they both sticking it in all my photos (grump)

This is schema info I can find from MS, but it does not meantion PersonSourceID
http://msdn.microsoft.com/en-us/library/windows/desktop/ee719905(v=vs.85).aspx

This is an interesting thread on digikam that talks all about it and how they supported it.
https://bugs.kde.org/show_bug.cgi?id=271030

Summary is that I believe those are all the feilds I can find. If you need a real photo to try it out on then just shout.

Thanks again for all this, you are a star.
MarkB

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14896
    • ExifTool Home Page
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #10 on: July 26, 2012, 07:23:37 AM »
Ok so even MS dont have the namespace link working (sigh).
http://ns.microsoft.com/photo/1.2/t/Region#
so why do they both sticking it in all my photos (grump)

Unfortunately, the XMP namespaces are URI's, not URL's, so they don't necessarily point to valid web pages.

Quote
This is schema info I can find from MS, but it does not meantion PersonSourceID
http://msdn.microsoft.com/en-us/library/windows/desktop/ee719905(v=vs.85).aspx

This is very useful, but (in true form) Microsoft doesn't even follow their own specification.  In your images (and their example) they use PersonLiveIdCID, but it is documented as PersonLiveCID.  Idiots.  I'll just ignore the documentation and go with the observed tags.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14896
    • ExifTool Home Page
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #11 on: July 26, 2012, 08:38:10 AM »
OK, I've fixed the documentation and added the new tags.  The new flattened tag names will be:

RegionRectangle
RegionPersonDisplayName
RegionPersonEmailDigest
RegionPersonLiveIdCID
RegionPersonSourceID

I plan to release ExifTool 8.98 with this update within a couple of days.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Reg

  • Newbie
  • *
  • Posts: 2
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #12 on: November 10, 2012, 06:43:59 PM »
Hi there.
I just discovered this post (and forum) tonight by googling, "strip MPReg:PersonLiveCID".  It seems I've been struggling with the same issues that Mark has had to deal with...

I've used exiftool in the past for doing bulk applys of GEO data to old scanned legacy photos, but really am quite new to it.

From the advice in this post, I was able to remove this abhorrent contact info from my people tag -- so ExifTool seems to have done its job -- thanks!

BUT...  I'm wondering if Mark has come up with a solution to the next issue...  WLPG keeps re-writing this data!  >:(

I recognize that this is really a question for Microsoft/WLPG, but if WLPG had adequate support then I wouldn't need ExifTool for this task in the first place...  It seems impossible to untie a person's "People Tag" from their contact info in WLPG.

Any ideas?

Thank you for any suggestions.

StoneMonkeyMark

  • Jr. Member
  • **
  • Posts: 10
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #13 on: November 10, 2012, 06:53:58 PM »
Hi,
You wont like the answer.
I have removed all the people out of Messenger in all the people using it. Then I also try to make sure that we dont log on in WLPG. I think that is doing it as I on longer have update thrash.
How does WLPG work with two friends called John Smith. They have to stop assuming at some point. So once clean you should be OK.
Good Luck.
Please log the bug with MS. They have politely listened so they make do something if more people complain.
MarkB

Reg

  • Newbie
  • *
  • Posts: 2
Re: Deleting XMP-MP:RegionInfoMPRegionsPersonLiveIdCID from WLPG Files
« Reply #14 on: December 14, 2012, 01:31:09 PM »
Sorry for the late response.  You're right of course, Mark -- I didn't like the answer, but I definitely appreciated it.  Thanks for all the attention you've given this problem with WLPG.

I did finally manage today to get WLPG to effectively remove this unwanted data.  Really, I just did a batch retag to a new temp tag, destroyed the original tag, and then renamed the temp tag back to the original name.  It was pretty simple -- I don't know what took me so long to try this.  :-\

I've posted the detailed steps of how to do it in the Microsoft Community thread on this topic:
http://answers.microsoft.com/en-us/windowslive/forum/gallery-signin/how-to-stop-wlpg-from-updating-the-contacts-into/d1938455-a99e-4a78-90aa-74ca4ddf2f05?auth=1&page=2

Thanks again Phil, and MarkB!