Delphi example to read EXIF and write & read IPTC

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
Nols Smit
Posts: 16
Joined: Mon Jun 27, 2005 6:38 pm

Delphi example to read EXIF and write & read IPTC

Post by Nols Smit » Fri May 14, 2010 12:03 pm

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;

User avatar
AmigoJack
Posts: 33
Joined: Tue Mar 09, 2010 6:40 pm
Contact:

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

Post by AmigoJack » Fri May 14, 2010 5:43 pm

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.

User avatar
madiazg
Posts: 82
Joined: Wed Jul 18, 2007 8:00 pm
Location: Tenerife - Islas Canarias
Contact:

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

Post by madiazg » Sat May 15, 2010 5:45 pm

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

Nols Smit
Posts: 16
Joined: Mon Jun 27, 2005 6:38 pm

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

Post by Nols Smit » Tue May 18, 2010 6:29 am

Hi,

Thanks for the comments. I got it working now.

Regards,

Nols Smit

Post Reply