Delphi Examples

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

Delphi Examples

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

More Examples...
Amazon S3
Byte Array
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

Type Conversion

 

Article: Understanding COM References in Delphi

Add XMP Metadata to a JPG Image File

Download Chilkat XML ActiveX

Delphi example program to embed XMP metadata into a JPEG image file.

procedure TForm1.Button3Click(Sender: TObject);
var
  success : Integer;
  numXmp: Integer;
  xml: IChilkatXml;
begin
      ChilkatXmp1.UnlockComponent('Anything for 30-day trial');

      // Load a JPEG image file (which has no embedded XMP metadata yet).
      success := ChilkatXmp1.LoadAppFile('cheese32.jpg');
      if (success = 0) then
        begin
            ChilkatXmp1.SaveLastError('lastError.txt');
            ShowMessage(ChilkatXmp1.LastErrorText);
        end;

      // How many XMP metadata docs are embedded in this image file?
      numXmp := ChilkatXmp1.NumEmbedded;

      if (numXmp = 0) then
        begin
            // Create a new XMP document
            // (XML Reference: http://www.chilkatsoft.com/refdoc/xChilkatXmlRef.html)
            xml := ChilkatXmp1.NewXmp();

            // Add some simple properties:
            ChilkatXmp1.AddSimpleStr(xml,'exif:PixelXDimension','240');
            ChilkatXmp1.AddSimpleStr(xml,'exif:PixelYDimension','240');

            // Append the XMP to the JPG.
            ChilkatXmp1.Append(xml);
            
            // Save the JPG with embedded XMP metadata
            ChilkatXmp1.SaveAppFile('out.jpg');
        end;
end;

 

 

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

Mail Component · .NET Email Component · XML Parser