Page 1 of 1
Reading EXIF data
Posted: Sun Apr 06, 2008 4:59 pm
by madiazg
Hello,
can you indicate me the way of obtaining and interpreting the EXIF data of an image?
I am using Turbo Delphi .
Regards...
Re: EXIF
Posted: Mon Apr 14, 2008 8:45 am
by xnview
gflBitmapGetEXIF
Posted: Wed May 14, 2008 10:06 pm
by madiazg
Can you indicate any example to get exif data?
Posted: Thu May 15, 2008 6:19 am
by xnview
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);
}
Delphi
Posted: Thu May 15, 2008 8:47 pm
by madiazg
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;
Posted: Sat Aug 02, 2008 2:17 pm
by madiazg
Hello, replacing the code
Code: Select all
EXIF := gflBitmapGetEXIF(gfl_bmp,0);
by that other
Code: Select all
Exif := gflLoadExif(Pchar(FileName),0);
It works well. There seems to be an error in (TurboDelphi)