ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Trying to read xmp tags

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
nwscomps Posted - May 16 2016 : 12:40:57
Hello, I am trying without success to read the xmp tags from file.
Although the XMP_Info is filled correctly, it seems the parsing is missing the fields I want to read. Actually no field is read.

I tried using both:

for I := 0 to XmpTags.Count-1 do
begin
aGrid.cells[0,i] := XmpTags[i].Name;
aGrid.cells[1,i] := ftmpparams.XMP_AsStr[XmpTags[i].Name];
end;

and the other method

dict := ftmpParams.Dict.GetDictionary('XMP');
for I := 0 to XmpTags.Count-1 do
begin
aGrid.cells[0,i] := XmpTags[i].Name;
try
aGrid.cells[1,i] := dict.GetString(XmpTags[i].Name);
except
end;
end;

I have created a stringlist with the names of the tags I want to read.
For example I added the following tags:
Iptc4xmpCore:CreatorContactInfo
Iptc4xmpCore:CiAdrCity
Iptc4xmpCore:CiAdrCtry
Iptc4xmpCore:CiAdrExtadr
Iptc4xmpCore:CiAdrPcode
Iptc4xmpCore:CiAdrRegion

The test image: http://metadatadeluxe.pbworks.com/f/1242756531/IPTCpanel.jpg

Thank you for any answer,
Francesco


Francesco Savastano
Nwscomps.com
Add-ons for the ImageEn Library
6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 30 2018 : 15:21:22
XMP_AsStr uses a class helper in the unit iexMetaHelpers.pas. So ensure iexMetaHelpers is in your uses clause.

Also, what version of Delphi are you using?

Nigel
Xequte Software
www.imageen.com
HeCaRe Posted - Oct 30 2018 : 10:16:02
I have a problem:

I have tried to compile the XMP-example and get the error message undeclated identifier XMP_AsStr.
What am I doing?
xequte Posted - May 18 2016 : 18:43:35
Hi Francesco

I'm using the XMP demo, but compiling in v6.3.0. Please email me and I'll give you an update.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
nwscomps Posted - May 18 2016 : 09:28:22
Hello Nigel,
I am using v. 6.2.2 on DXE2

Your XMPDemo also found here:
http://imageen.com/ieforum/topic.asp?TOPIC_ID=1446&whichpage=3&SearchTerms=xmp
cannot read the metadata in this picture (Date of the exe is 13/05/2015)

I have uploaded my demo project with the image file included, at my website:
http://www.nwscomps.com/downloads/test_metadata.zip
In my case all the values read are empty.

Thank you,
Francesco



Francesco Savastano
Nwscomps.com
Add-ons for the ImageEn Library
xequte Posted - May 17 2016 : 18:36:17
Hi Francesco

This code works fine for me. What version of ImageEn are you using?

procedure TMainForm.Button1Click(Sender: TObject);
var
  tags:tstringlist;
  I: Integer;
begin
  imageenview1.IO.LoadFromFile('D:\test\IPTCpanel.jpg');
  tags := tstringlist.create;
  try
  tags.add('Iptc4xmpCore:CreatorContactInfo');
  tags.add('Iptc4xmpCore:CiAdrCity');
  tags.add('Iptc4xmpCore:CiAdrCtry');
  tags.add('Iptc4xmpCore:CiAdrExtadr');
  tags.add('Iptc4xmpCore:CiAdrPcode');
  tags.add('Iptc4xmpCore:CiAdrRegion');


  Memo1.Text := '';
  for I := 0 to tags.count-1 do
    Memo1.Lines.Add( tags[i] + ': ' + ImageEnView1.IO.Params.XMP_AsStr[ tags[ i ]]);
  finally
    tags.free;
  end;
end;



Iptc4xmpCore:CreatorContactInfo: IPTC COPANEL: POSTAL
Iptc4xmpCore:CiAdrCity: IPTC CONTACT PANEL: CITY
Iptc4xmpCore:CiAdrCtry: IPTC CONTACT PANEL: COUNTRY
Iptc4xmpCore:CiAdrExtadr: IPTC CONTACT PANEL: ADDRESS
Iptc4xmpCore:CiAdrPcode: IPTC COPANEL: POSTAL
Iptc4xmpCore:CiAdrRegion: IPTC CONTACT PANEL: STATE/PROVINCE


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
nwscomps Posted - May 16 2016 : 12:59:24
Here is a complete example code:

procedure TForm1.Button1Click(Sender: TObject);
var
tags:tstringlist;
  I: Integer;
begin

  imageenview1.IO.LoadFromFile('D:\test\IPTCpanel.jpg');
  tags := tstringlist.create;
  try
    tags.add('Iptc4xmpCore:CreatorContactInfo');
    tags.add('Iptc4xmpCore:CiAdrCity');
    tags.add('Iptc4xmpCore:CiAdrCtry');
    tags.add('Iptc4xmpCore:CiAdrExtadr');
    tags.add('Iptc4xmpCore:CiAdrPcode');
    tags.add('Iptc4xmpCore:CiAdrRegion');


     for I := 0 to tags.count-1 do
       showmessage(imageenview1.IO.Params.XMP_AsStr[tags[i]]);
  finally
    tags.free;
  end;
end;

All the tag values read are empty.

Francesco Savastano
Nwscomps.com
Add-ons for the ImageEn Library