Page 1 of 1

Error EXIF Data in Nikon

Posted: Sat Sep 19, 2009 4:10 pm
by madiazg
Hi,
I am using version 3.15 of GFL SDK. If I Load an image and saving it, EXIF data are saved correctly:

Code: Select all

    gflLibraryInit();
    gflGetDefaultLoadParams(mLoadOption);
    mLoadOption.Flags := GFL_LOAD_READ_ALL_COMMENT;
    mLoadOption.Flags := GFL_LOAD_METADATA;
    mError := gflLoadBitmap(Pchar(FileName1),mOriBitmap, mLoadOption, lInformation); // Carga una imagen en Memoria

    gflGetDefaultSaveParams(mSaveOption);
    mSaveOption.Flags := GFL_SAVE_REPLACE_EXTENSION;
    mSaveOption.Flags := GFL_SAVE_ICC_PROFILE;
    mSaveOption.FormatIndex := 0;
    mSaveOption.Quality := 50;
    gflSaveBitmap(PChar('prueba.jpg'),mOriBitmap,mSaveOption);
If I load the EXIF data and then I save them

Code: Select all

    gflLibraryInit();
    gflGetDefaultLoadParams(mLoadOption);
    mLoadOption.Flags := GFL_LOAD_READ_ALL_COMMENT;
    mLoadOption.Flags := GFL_LOAD_METADATA;
    mError := gflLoadBitmap(Pchar(FileName1),mOriBitmap, mLoadOption, lInformation); // Carga una imagen en Memoria

//EXIF 2
    mEXIFData2 := gflBitmapGetEXIF2(mOriBitmap);

    gflBitmapRemoveMetaData(mOriBitmap);
    gflBitmapSetEXIF2(mOriBitmap,mEXIFData2);

    gflGetDefaultSaveParams(mSaveOption);
    mSaveOption.Flags := GFL_SAVE_REPLACE_EXTENSION;
    mSaveOption.Flags := GFL_SAVE_ICC_PROFILE;
    mSaveOption.FormatIndex := 0;
    mSaveOption.Quality := 50;
    gflSaveBitmap(PChar('prueba.jpg'),mOriBitmap,mSaveOption);
    gflFreeEXIF2(mEXIFData2);
there are errors in the following fields:
  • x Resolution
    y Resolution
    Exposure Time
    Focal Length
Curiously, if I load the previously saved image and I save it, EXIF data is stored correctly as in the original image. That is, the second copy retains the EXIF data correctly.

This error does not occur with other camera models

You can download an image here:
http://personal.telefonica.terra.es/web ... mg0022.jpg

Miguel Angel
http://imagen3d.site88.net

Re: Error EXIF Data in Nikon

Posted: Sun Oct 04, 2009 3:01 pm
by madiazg
Hi,
have you been able to find out what the problem?

Miguel Angel
http://imagen3d.site88.net