Discussions on GFL SDK, the graphic library for reading and writing graphic files
Moderators: helmut , XnTriq , xnview
Philippe
Posts: 3 Joined: Wed Apr 28, 2004 11:27 am
Location: Ch'ti (France)
Contact:
Post
by Philippe » Wed Apr 28, 2004 8:32 pm
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?
xnview
Author of XnView
Posts: 46236 Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:
Post
by xnview » Thu Apr 29, 2004 4:43 am
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.
Philippe
Posts: 3 Joined: Wed Apr 28, 2004 11:27 am
Location: Ch'ti (France)
Contact:
Post
by Philippe » Thu Apr 29, 2004 9:38 pm
not, much of photographs do not have the problem
Guest
Post
by Guest » Tue May 04, 2004 2:45 pm
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?
xnview
Author of XnView
Posts: 46236 Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:
Post
by xnview » Thu May 13, 2004 3:06 pm
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.
Kobby
Posts: 2 Joined: Fri Nov 10, 2006 2:26 pm
Post
by Kobby » Fri Nov 10, 2006 2:37 pm
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(¶ms);
error = gflLoadBitmap(strFileName, &pgflBitmap, ¶ms, 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?
Kobby
Posts: 2 Joined: Fri Nov 10, 2006 2:26 pm
Post
by Kobby » Fri Nov 10, 2006 2:51 pm
Ops,
I just did not swich on flage GFL_LOAD_METADATA.
It works fine now.