← Back to team overview

pyexiv2-developers team mailing list archive

Re: Writing XMP Bag and contained information - MS Photo schema

 

Hi.

As you already found out, a current limitation of pyexiv2 is that it
doesn’t allow setting the type of an unknown tag in a custom namespace
to anything other than XmpText (this is documented in the tutorial, see
http://tilloy.net/dev/pyexiv2/tutorial.html#reading-and-writing-xmp-tags).

But the tags I want to add are not in a custom namespace. I added the namespaces in libexiv2 before. Currently not in trunk, but as patch appended to the discussion at http://dev.exiv2.org/boards/3/topics/1039.

Could this maybe be a shortcoming of pyexiv2? I guess this is a special case which currently is not often used: There is a tag containing nothing but structures of other tags. Example:

Xmp.MP.RegionInfo                            XmpText     0  type="Struct"
Xmp.MP.RegionInfo/MPRI:Regions XmpText 0 type="Bag" <- problem is here
Xmp.MP.RegionInfo/MPRI:Regions[1]            XmpText     0  type="Struct"
Xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:Rectangle XmpText 38 0.661608, 0.244310, 0.130501, 0.261002 Xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:PersonDisplayName XmpText 8 Baby Tux

The only other tags I found that may correspond to this structure are Xmp.XmpMM.History* although there is still less tag hierachy.

Xmp.xmpMM.History                            XmpText     0  type="Seq"
Xmp.xmpMM.History[1]                         XmpText     0  type="Struct"
Xmp.xmpMM.History[1]/stEvt:action            XmpText     7  created
Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 40 xmp.iid:4D9C1E280B37E111A568FF94F417581A Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2012-01-04T20:32:52+01:00 Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 27 Adobe Photoshop CS5 Windows

Could the latter be written to file using pyexiv2?

My problem seems to be there is no ArrayType (Bag, ...) in pyexiv2? Only arrayValues and tag type. Would it be complex to add this to pyexiv2 if it is no libexiv2 issue? I have never worked with anything like boost and Cpp. See http://dev.exiv2.org/boards/3/topics/1039#message-1044 Exiv2::XmpValue::setXmpArrayType()

If it helps, I can provide you my patched libexiv2 source.


Regards,
Benjamin

Attachment: smime.p7s
Description: S/MIME Kryptografische Unterschrift


References