Page 1 of 1

EXIF problem [Delphi]

Posted: Wed Apr 28, 2004 8:32 pm
by Philippe
Hello!

This is how I managed the EXIT in my file

Code: Select all

gflGetDefaultLoadParams(LoadParam);
LoadParam.Flags := GFL_LOAD_METADATA;
Erreur := gflLoadBitmap(NomFichier, GFLImage, LoadParam, InformationFichier);
if GFLBitmapHasEXIF(GFLImage) = GFL_True then
Exif := gflBitmapGetEXIF(GFLImage, EXIF_MAIN_IFD);

However I have the following error message "incorrect floating point operation" when I execute the function gflBitmapGetEXIF

the structure of EXIF is

Code: Select all

const
   EXIF_MAIN_IFD = $0001;
   EXIF_IFD_0 = $0002;
   EXIF_INTEROPERABILITY_IFD = $0004;
   EXIF_IFD_THUMBNAIL = $0008;
   EXIF_GPS_IFD = $0010;
   EXIF_MAKERNOTE_IFD  = $0020;

type
   TGFL_EXIF_ENTRY  = record
                       Flag  : GFL_UINT32; // EXIF_...IFD
                       Tag   : GFL_UINT32;
                       Name  : PCHAR;
                       Value : PCHAR;
                     end;
   PGFL_EXIF_ENTRY = ^TGFL_EXIF_ENTRY;

type
   TTabGFL_EXIF_ENTRY = array [0..0] of TGFL_EXIF_ENTRY;
   PTTabGFL_EXIF_ENTRY = ^TTabGFL_EXIF_ENTRY;
   TGFL_EXIF_DATA  = record
                      NumberOfItems : GFL_UINT32;
                      ItemsList     : PTTabGFL_EXIF_ENTRY; //PGFL_EXIF_ENTRY;
                    end;
   PGFL_EXIF_DATA = ^TGFL_EXIF_DATA;

The problem does not occur everytime I open a picture

Any ideas?

Re: EXIF problem [delphi]

Posted: Thu Apr 29, 2004 4:43 am
by xnview
Philippe wrote:This is how I managed the EXIT in my file
Seems to be correct!
However I have the following error message "incorrect floating point operation" when I execute the function gflBitmapGetEXIF
You have the problem on all picture with EXIF data?
Pierre.

Posted: Thu Apr 29, 2004 9:38 pm
by Philippe
not, much of photographs do not have the problem

Posted: Tue May 04, 2004 2:45 pm
by Guest
Moreover, with these photographs, I cannot use the functions GFLResize or GFLRotate. I have an error "Error to create file" on the GFLSaveBitmap function.

Does somebody have an idea?

Posted: Thu May 13, 2004 3:06 pm
by xnview
Anonymous wrote:Moreover, with these photographs, I cannot use the functions GFLResize or GFLRotate. I have an error "Error to create file" on the GFLSaveBitmap function.
Does somebody have an idea?
Could you tell me more about these photos? Or send me example?
Pierre.

Posted: Fri Nov 10, 2006 2:37 pm
by Kobby
Same problem. I use VC.Net with a similar code:

Code: Select all

	GFL_LOAD_PARAMS params; 
	GFL_BITMAP gflBitmap; 
	GFL_BITMAP *pgflBitmap = &gflBitmap; 
	GFL_ERROR error; 
	gflGetDefaultLoadParams(&params);

	error = gflLoadBitmap(strFileName, &pgflBitmap, &params, NULL);
	if (error == GFL_NO_ERROR)
	{

		if(	gflBitmapHasEXIF(pgflBitmap))
		{
			GFL_EXIF_DATA *pEXIF = 	gflBitmapGetEXIF(pgflBitmap, 0);
			for (int i = 0; i<pEXIF>NumberOfItems; i++)
			{
				ATLTRACE2( atlTraceGeneral, 4,"%s\t%s\r\n",pEXIF->ItemsList[i].Name,pEXIF->ItemsList[i].Value);

				
			}
		}
I always get an access violation error on the gflBitmapHasEXIF.
Any thoughts?

Posted: Fri Nov 10, 2006 2:51 pm
by Kobby
Ops,
I just did not swich on flage GFL_LOAD_METADATA.
It works fine now.