gflSaveIPTC

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

Moderators: XnTriq, xnview

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

gflSaveIPTC

Post by kla » Thu Dec 02, 2010 1:26 pm

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: 31143
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: gflSaveIPTC

Post by xnview » Fri Dec 03, 2010 12:09 am

Could you post a code?
Pierre.

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

Re: gflSaveIPTC

Post by kla » Fri Dec 03, 2010 7:17 am

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 » Sat Dec 04, 2010 11:10 am

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: 31143
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: gflSaveIPTC

Post by xnview » Thu Dec 09, 2010 4:22 pm

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

Post Reply