gflSaveIPTC

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

Moderators: XnTriq, helmut, xnview

Post Reply
kla
Posts: 2
Joined: Thu Dec 02, 2010 12:10 pm

gflSaveIPTC

Post by kla »

I'm trying to use GFLSDK in Delphi (latest (XE) edition), but gflSaveIPTC returns always with >1< (GFL_ERROR_FILE_OPEN).

Thanks for any help.
Laszlo
User avatar
xnview
Author of XnView
Posts: 43603
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: gflSaveIPTC

Post by xnview »

Could you post a code?
Pierre.
kla
Posts: 2
Joined: Thu Dec 02, 2010 12:10 pm

Re: gflSaveIPTC

Post by kla »

Hi Pierre!

My test is very simple:

Code: Select all

procedure TImageViewForm.Button4Click(Sender: TObject);
var
  PIPTC : PGFL_IPTC_DATA;
  s : ansistring;
  iRet : integer;
begin
  PIPTC := gflLoadIPTCW(widestring('c:\a\1.jpg'));
  gflSetIPTCValue(PIPTC, GFL_IPTC_CREDITS, 'XXXXXXXXXXXXXXXXX');
  iRet := gflSaveIPTCW(widestring('c:\a\1.jpg'), PIPTC);
end;
After call of gflSetIPTCValue iRet is >1<.

With gflLoadBitmapW ... gflSetIPTCValue ... gflSaveBitmapW my test works fine, but with gflLoadIPTCW ... gflSaveIPTCW doesn't.

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

Re: gflSaveIPTC

Post by madiazg »

Hello,
I use Tutbodelphi:

Code: Select all

var
  IptcData : PGFL_IPTC_DATA;
  FileNameA : string;
begin
....
FilenameA := OpenDialog1.Filename;
IptcData := gflLoadIPTC(Pchar(FileNameA));
...
gflSetIptcValue(IptcData,GFL_IPTC_OBJECTNAME,Pchar(FormIPTC.Edit1.Text));
....
gflSaveIPTC(Pchar(fileNameA),IptcData);
Regards...
Miguel Angel
http://imagen3d.site88.net/
User avatar
xnview
Author of XnView
Posts: 43603
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: gflSaveIPTC

Post by xnview »

Ok, i've found the problem. Send me your email by PM
Pierre.
Post Reply