I need help to save EXIF data in DELPHI

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

Moderators: XnTriq, xnview

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

I need help to save EXIF data in DELPHI

Post by madiazg » Sat Nov 01, 2008 10:12 pm

Hello,
I have problems to save EXIF data in DELPHI.

Code: Select all

var
  EXIF2 : PGFL_EXIF_DATAEX;
....
begin
    gflEnableLZW(GFL_TRUE);
    gflGetDefaultLoadParams(lp);
    lp.ColorModel := GFL_BGR;
    lp.LinePadding := 4;
    gflLoadBitmap(Pchar(FileName1),gfl_bmp, lp, finfo);
//EXIF 2
    if gflBitMapHasEXIF(gfl_bmp1b) = gfl_no_error then
    begin
      EXIF2 := gflBitmapGetEXIF2(gfl_bmp);
........
      gflBitmapSetEXIF2(gfl_bmp,EXIF2);
      gflFreeEXIF2(EXIF2);
      gflGetDefaultSaveParams(sp);
      sp.FormatIndex := gflGetFormatIndexByName('jpeg');
      gflSaveBitmap(PChar('prueba.jpg'),gfl_bmp,sp);
    end;
...
end;
EXIF2 not load any data. After saving the EXIF data and save the file, the EXIF data in the PRUEBA.JPG file appear in white.
What's happening?
Rgds,
Miguel Angel

User avatar
xnview
Author of XnView
Posts: 29888
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: I need help to save EXIF data in DELPHI

Post by xnview » Sun Nov 02, 2008 11:06 am

Please use GFL_LOAD_METADATA
Pierre.

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

Post by madiazg » Sun Nov 02, 2008 9:21 pm

Thank you very much,
It works perfectly.

Post Reply