Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Display XMP Simple Property ValuesDelphi example program to load a JPG image file, access the XMP metadata, and display the values of some simple properties. procedure TForm1.Button2Click(Sender: TObject);
var
success : Integer;
numXmp: Integer;
xml: IChilkatXml;
begin
ChilkatXmp1.UnlockComponent('Anything for 30-day trial');
// Load a JPEG image file.
success := ChilkatXmp1.LoadAppFile('AgencyPhotographer-Example.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
// Get the 1st XMP as a Chilkat XML object (IChilkatXml)
// See http://www.chilkatsoft.com/refdoc/xChilkatXmlRef.html
xml := ChilkatXmp1.GetEmbedded(0);
// Fetch and display the values of some simple properties:
ListBox1.Items.Add(ChilkatXmp1.GetSimpleStr(xml, 'Iptc4xmpCore:Location'));
ListBox1.Items.Add(ChilkatXmp1.GetSimpleStr(xml, 'Iptc4xmpCore:CountryCode'));
end;
end;
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.