Hola,
a ver si alguien me puede ayudar.
Resulta que estoy programando una aplicación para realizar imágenes en 3D (anaglifas, Side-by-Side y Gif)(
http://imagen3d.site88.net/) y quiero obtener los datos EXIF de los ficheros que cargo. Utilizo una librería denominada gflLib utilizada en el programa XnView (
http://www.xnview.com/).
Por lo visto, para mostrar los datos, en C se utilizaría el siguiente código:
Código:
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);
}
En
gflLib.pas aparece:
Código:
// EXIF
const
GFL_EXIF_MAIN_IFD = $0001;
GFL_EXIF_IFD_0 = $0002;
GFL_EXIF_INTEROPERABILITY_IFD = $0004;
GFL_EXIF_IFD_THUMBNAIL = $0008;
GFL_EXIF_GPS_IFD = $0010;
GFL_EXIF_MAKERNOTE_IFD = $0020;
GFL_EXIF_MAKER = $010F;
GFL_EXIF_MODEL = $0110;
GFL_EXIF_ORIENTATION = $0112;
GFL_EXIF_EXPOSURETIME = $829A;
GFL_EXIF_FNUMBER = $829D;
GFL_EXIF_DATETIME_ORIGINAL = $9003;
GFL_EXIF_SHUTTERSPEED = $9201;
GFL_EXIF_APERTURE = $9202;
GFL_EXIF_MAXAPERTURE = $9205;
GFL_EXIF_FOCALLENGTH = $920A;
type
PGFL_EXIF_ENTRY = ^TGFL_EXIF_ENTRY;
TGFL_EXIF_ENTRY = packed record
Flag : GFL_UINT32; // EXIF_...IFD
Tag : GFL_UINT32;
Name : PChar;
Value : PChar;
end;
PTTabGFL_EXIF_ENTRY = ^TTabGFL_EXIF_ENTRY;
TTabGFL_EXIF_ENTRY = array [0..0] of TGFL_EXIF_ENTRY;
PGFL_EXIF_DATA = ^TGFL_EXIF_DATA;
TGFL_EXIF_DATA = packed record
NumberOfItems : GFL_UINT32;
ItemsList : PTTabGFL_EXIF_ENTRY; // PGFL_EXIF_ENTRY;
end;
function gflBitmapHasEXIF(src: PGFL_BITMAP): GFL_BOOL; stdcall;
function gflBitmapGetEXIF(src: PGFL_BITMAP; flags: GFL_UINT32): PGFL_EXIF_DATA; stdcall;
procedure gflFreeEXIF(exif: PGFL_EXIF_DATA); stdcall;
procedure gflBitmapRemoveEXIFThumbnail(src: PGFL_BITMAP); stdcall;
No se si con estos datos es suficiente.
Pueden ayudarme a traducir este código a Delphi ya que no conozco C.
Saludos...
Miguel Angel