Hello,
can you indicate me the way of obtaining and interpreting the EXIF data of an image?
I am using Turbo Delphi .
Regards...
Reading EXIF data
Moderators: XnTriq, helmut, xnview
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
-
- Author of XnView
- Posts: 44325
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Code: Select all
exif = gflBitmapGetEXIF(bitmap, 0);
if (exif)
{
for ( i=0; i<exif->NumberOfItems; i++)
printf("EXIF %x %x <%s> = %s\n", exif->ItemsList[i].Flag, exif->ItemsList[i].Tag, exif->ItemsList[i].Name, exif->ItemsList[i].Value );
gflFreeEXIF(exif);
}
Pierre.
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Delphi
Can you tell me where is the mistake?
Code: Select all
var
lp1b: TGFL_LOAD_PARAMS;
gfl_bmp1b: PGFL_BITMAP;
Pgfl_color1b: TGFL_COLOR;
finfo1b: TGFL_FILE_INFORMATION;
e1 : GFL_ERROR;
Exif : PGFL_EXIF_DATA;
begin
gflEnableLZW(GFL_TRUE);
gflGetDefaultLoadParams(lp1b);
lp1b.ColorModel := GFL_BGR;
lp1b.LinePadding := 4;
gflLoadBitmap(Pchar(FileName1),gfl_bmp1b, lp1b, finfo1b);
e1 := gflBitMapHasEXIF(gfl_bmp1b);
if gflBitMapHasEXIF(gfl_bmp1b) = gfl_no_error then
begin
LabelEXIF.Enabled := True;
Exif := gflBitmapGetEXIF(gfl_bmp1b,0);
Label1.Caption := IntToStr(Exif.NumberOfItems); //ERROR!!!!
gflFreeEXIF(Exif);
end else MessageDlg('File not readable: ' + string(gflGetErrorString(e1)), mtError, [mbOK], 0);
end;
-
- Posts: 82
- Joined: Wed Jul 18, 2007 8:00 pm
- Location: Tenerife - Islas Canarias
Hello, replacing the code
by that other
It works well. There seems to be an error in (TurboDelphi)
Code: Select all
EXIF := gflBitmapGetEXIF(gfl_bmp,0);
Code: Select all
Exif := gflLoadExif(Pchar(FileName),0);
Code: Select all
gflBitmapGetEXIF