I've started this thread out of desperation. I'm building my own application to read/write metadata to JPEG's.
The following post has been put on several different forums and I have had no replies/comments at all.
I appreciate this is a PM forum, and my question does not relate directly to PM, and would ask if anyone could help me with this problem. I use VB.Net and have a limited understanding of C++.
ORIGINAL POST:-
Can anyone help?
I'm building an application to read/write metadata to jpeg's using bitmap metadata in VB.Net (VS2010). I have successfully been able to produce various xmpnodes using the SETQuery function.
I've been able to produce xmpbag, xmpstruct and xmpseq nodes separately.
My problem is that I can create the "locationcreated" xmp bag reader and within that node I can produce an xmp structure reader within the "bag", however I cannot write the various child nodes on the actual data, IE sublocation, city etc;
I have used the following code to successfully produce the xmp bag reader (The IPTC4Ext is a constant that holds the namespace
Public Const IPTC4Ext As String = "/xmp/{wstr=http://iptc.org/std/Iptc4xmpExt/2008-02-29/}:"
My code to successfully produce the xmp bag reader is:-
If metadata.ContainsQuery(IPTC4Ext & "LocationCreated") = False Then
metadata.SetQuery(IPTC4Ext & "LocationCreated", New BitmapMetadata("xmpbag"))
End If
Next I use the following code to successfully produce an xmp structure reader within the xmp bag reader:-
If metadata.ContainsQuery(IPTC4Ext & "LocationCreated/{ulong=0}") = False Then
metadata.SetQuery(IPTC4Ext & "LocationCreated/{ulong=0}", New BitmapMetadata("xmpstruct"))
End If
The problem I have is I'm trying to add/modify information in the structure reader pertaining to the location created "children" IE "sublocation" , "city", "state" etc; I have tried different methods including the one shown below to add/modify these values.
metadata.SetQuery(IPTC4Ext & "LocationCreated/{ulong=0}" & IPTC4Ext & "/City", "London")
The xmp bag reader, and xmp structure reader, both appear in the WIC Explorer exactly the same as is produced by Adobe Photoshop and Photomechanic PM5.
Can anyone help me solve this problem?
Regards John