Page 1 of 1

Delphi example to read EXIF and write & read IPTC

Posted: Fri May 14, 2010 12:03 pm
by Nols Smit
Hi,

I downloaded the example GflSDK.20100320.zip from posting http://newsgroup.xnview.com/viewtopic.p ... phi#p82804 but I get the following errors when compiling it:
libgfl.Load gfl: "..\..\..\libW\libgfl311.dll" failed: 126 (0x0000007E) The specified module could not be found.
libgfl.Load gfle: "..\..\..\libW\libgfle311.dll" failed: 126 (0x0000007E) The specified module could not be found.

My effort follows:

procedure TForm1.btnGetIPTCClick(Sender: TObject);
var
iptc_data: PGFL_IPTC_DATA;
i: Cardinal;
s: string;
begin
iptc_data := gflNewIPTC;
try
gflLoadIPTC('D:\My Documents\Delphi\ScannedMaps\Temp\scalledImage.jpg');
for i := 0 to iptc_data.NumberOfItems -1 do
begin
// What now???
end;
finally
gflFreeIPTC(iptc_data);
end;
end;

Re: Delphi example to read EXIF and write & read IPTC

Posted: Fri May 14, 2010 5:43 pm
by AmigoJack
Most recent Delphi interface is 20100321, that's two posts below - you should have read the whole thread.

As for your errors: they cannot be more precise. They already tell you "hey, I cannot find this DLL at that location". So...
  1. Did you download the GFL SDK at all? You need the DLLs to make anything at all. What you have downloaded is not the GFL SDK - it's only the (up-to-date) Delphi interface for GFL SDK.
  2. Have you verified to successfully run the demo at least? The demo also includes code on how to read IPTC.

Re: Delphi example to read EXIF and write & read IPTC

Posted: Sat May 15, 2010 5:45 pm
by madiazg
Hello,
this is the code I use in my program Imagen3D to display data IPTC:

Code: Select all

var
  NItems : integer;
  Iptc : PGFL_IPTC_DATA;
....
begin
...
    if gflBitMapHasIPTC(gfl_bmp) = gfl_no_error then
    begin
      IPTC := gflLoadIPTC(Pchar(FileName));
      NItems := IPTC.NumberOfItems;
      for i := 0 to NItems-1 do
      begin
        ShowIPTC(Iptc.ItemsList[i].Name,Iptc.ItemsList[i].Value); //procedure that displays the values IPTC
      end;
      gflFreeIPTC(IPTC); //Libera Memoria
    end;

end;
Best Regards...
Miguel Angel
http://imagen3d.site88.net

Re: Delphi example to read EXIF and write & read IPTC

Posted: Tue May 18, 2010 6:29 am
by Nols Smit
Hi,

Thanks for the comments. I got it working now.

Regards,

Nols Smit