Page 1 of 1

GFL_BITMAP Xdpi & Ydpi

Posted: Wed Jul 01, 2009 1:27 pm
by dominique
Using this code with v3.05 of gflsdk, I can't have correct information about dpi while saving image in JPEG

Code: Select all

mpBitmap->Xdpi = lMetaData->mXDpi;
mpBitmap->Ydpi = lMetaData->mYDpi;
I thought it worked in the version 2.90
Any information about this?
Thx in advance ;)

Re: GFL_BITMAP Xdpi & Ydpi

Posted: Wed Jul 01, 2009 1:40 pm
by dominique
Looking in the header, I can't find the information of resolution :
FFD8FFE1
Instead of :
FFD8FFE000104A46494600010201012C012C0000FFE1
0x12C = 300
Do you miss something here ?

Re: GFL_BITMAP Xdpi & Ydpi

Posted: Wed Jul 01, 2009 3:58 pm
by dominique
I found that if I use

Code: Select all

gflBitmapRemoveMetaData(mpBitmap);
gflBitmapSetEXIF2(mpBitmap, EXIFData2);
the resolution is not more present in the jpeg header.
Without this, resolution is present in the jpeg header.

Using this code with v 2.90 is ok
Something has changed in version 3.05

Re: GFL_BITMAP Xdpi & Ydpi

Posted: Thu Jul 02, 2009 7:04 am
by xnview
And only

Code: Select all

gflBitmapRemoveMetaData(mpBitmap);
??

Re: GFL_BITMAP Xdpi & Ydpi

Posted: Thu Jul 02, 2009 9:16 am
by dominique
So it's not an exif problem but IPTC.
With the previous version of GFL I use to had IPTC data this way after saving JPEG image :

Code: Select all

gflSaveIPTC(mFileOut.c_str(), mIPTCData);
Using this the jpeg image lost resolution information in his header.
Perhaps there is an other way to had IPTC with 3.05 version?

Re: GFL_BITMAP Xdpi & Ydpi

Posted: Thu Jul 02, 2009 9:21 am
by dominique
Ok, I use this after erasing all meta data :

Code: Select all

gflSetIPTCValue(mIPTCData, GFL_IPTC_PROGRAM, "My Software");
gflBitmapSetIPTC(mOriBitmap, mIPTCData);
That's work fine !
So perhaps there is something bad in

Code: Select all

gflSaveIPTC(mFileOut.c_str(), mIPTCData);

Re: GFL_BITMAP Xdpi & Ydpi

Posted: Thu Jul 02, 2009 11:52 am
by dominique
Thanks for corrections !!!
Great job,