Visual C++ Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Visual C++ Examples

CkString
Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

 

Add XMP MetaData to JPG or TIF

C++ XMP example showing how to add XMP metadata to a JPG or TIFF that does not yet have XMP metadata embedded.

void AppendXmp(void)
    {
    // Adds XMP metadata to a JPG or TIFF that does not yet contain
    // embedded XMP metadata.
    CkXmp xmp;
    xmp.UnlockComponent("anything for 30-day trial");

    bool success = xmp.LoadAppFile("scream.jpg");
    if (!success)
	{
	xmp.SaveLastError("lastError.txt");
	return;
	}

    // Intialize a new XMP metadata document.
    CkXml xml;
    xmp.NewXmp(xml);

    // Add some properties:
    // <exif:PixelXDimension>432</exif:PixelXDimension>
    // <exif:PixelYDimension>288</exif:PixelYDimension>

    xmp.AddSimpleInt(xml,"exif:PixelXDimension",432);
    xmp.AddSimpleInt(xml,"exif:PixelYDimension",288);

    // Append it and save the JPG.  The "out.jpg" file now contains XMP metadata.
    xmp.Append(xml);
    xmp.SaveAppFile("out.jpg");

    // Save the XMP to an XML file so we can see what was embedded.
    xml.SaveXml("newXmp.xml");
    
    return;
    }

 

 

 

Need a specific example? Send a request to support@chilkatsoft.com

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

Mail Component · .NET Mail Component · XML Parser