Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Copy XMP Metadata from one JPEG to Another VB6 code showing how to copy XMP metadata from one JPG to another. ' 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 that contains XMP metadata.
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
' Load a JPG file without any embedded XMP info.
Dim xmp2 As New ChilkatXmp
success = xmp2.LoadAppFile("cheese32.jpg")
If (success = 0) Then
MsgBox xmp2.LastErrorText
Exit Sub
End If
' Add the XMP metadata from the 1st JPG to the 2nd.
xmp2.Append xml
' Save the 2nd JPG.
xmp2.SaveAppFile "cheeseXmp.jpg"
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.