Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Add XMP Array Property (Bag, Seq, or Alt) Visual Basic example program to add an array property to an XMP. ' Add an array property to an XMP
' Create an instance of the XMP ActiveX and unlock it.
Dim xmp As New ChilkatXmp
success = xmp.UnlockComponent("anything for 30 day trial")
If (success = 0) Then
MsgBox "Failed to unlock"
Exit Sub
End If
' Load a JPG file.
success = xmp.LoadAppFile("IndependantPhotographer-Example.jpg")
If (success = 0) Then
MsgBox xmp.LastErrorText
Exit Sub
End If
' Get the 1st (and only) XMP in this JPG.
Dim xml As ChilkatXml
Set xml = xmp.GetEmbedded(0)
If (xml Is Nothing) Then
MsgBox xmp.LastErrorText
Exit Sub
End If
Dim sa As New CkStringArray
sa.Append "chilkat"
sa.Append "ActiveX"
sa.Append "XMP"
sa.Append "component"
sa.Append "software"
' Add the array as a Bag named "extraStuff"
xmp.AddArray xml, "bag", "dc:extraStuff", sa
' Save the XML to verify that the dc:extraStuff array was added.
xml.SaveXml "out.xml"
' Save the JPG with the dc:extraStuff added.
xmp.SaveAppFile "out.jpg"
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.