Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Add Photoshop Property to XMP Embedded in JPG and Save

Download Chilkat XML ActiveX

Load JPG, access XMP metadata, and adds an additional Photoshop property. The JPG in this example already contains a number of Photoshop properties. This example adds one more: the photoshop:Instructions property.

    ' Visual Basic Example to load a JPG and add a new Photoshop schema property.
    ' In this example, a number of Photoshop schema properties already exist.
    ' This new property is added by calling
    ' xmp.AddSimpleStr xml, "photoshop:Instructions", "These are special instructions..."
    ' The AddSimpleStr method locates the correct rdf:Descripton node
    ' and inserts a new XML node.
    
    ' Add references to these ActiveX components in your VB6 project:
    ' Chilkat XML
    ' Chilkat XMP
    ' The AgencyPhotographer-Example.jpg test JPG can be downloaded from
    ' http://www.chilkatsoft.com/testData/AgencyPhotographer-Example.jpg

    ' 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("AgencyPhotographer-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
        
    ' Add a new Photoshop property.
    xmp.AddSimpleStr xml, "photoshop:Instructions", "These are special instructions..."
    
    ' Save the JPG with the update.
    xmp.SaveAppFile "out.jpg"
    
    ' IMPORTANT: After saving the JPG, the XML object should be discarded.  If you
    ' wish to continue editing the embedded JPG, you must re-fetch the XML object:
    Set xml = xmp.GetEmbedded(0)
    

 

© 2000-2012 Chilkat Software, Inc. All Rights Reserved.