GFL_BITMAP Xdpi & Ydpi

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

Post Reply
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

GFL_BITMAP Xdpi & Ydpi

Post 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 ;)
Dom
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

Re: GFL_BITMAP Xdpi & Ydpi

Post 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 ?
Dom
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

Re: GFL_BITMAP Xdpi & Ydpi

Post 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
Dom
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: GFL_BITMAP Xdpi & Ydpi

Post by xnview »

And only

Code: Select all

gflBitmapRemoveMetaData(mpBitmap);
??
Pierre.
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

Re: GFL_BITMAP Xdpi & Ydpi

Post 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?
Dom
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

Re: GFL_BITMAP Xdpi & Ydpi

Post 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);
Dom
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

Re: GFL_BITMAP Xdpi & Ydpi

Post by dominique »

Thanks for corrections !!!
Great job,
Dom
Post Reply