How to fill a BITMAPINFO structure?

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

Moderators: XnTriq, helmut, xnview

mojo

How to fill a BITMAPINFO structure?

Post by mojo »

Hi,

How can I fill a BITMAPINFO structure from an image loaded with your already insane cool library? ;) What im trying todo is to use the function "StretchDIBits", wich requires a filled BITMAPINFO structure. I have looked at one of the examples in "\GflSDK\win32\example.c", function "GetDIBFromBitmap". This seems simple enough, but i noticed alot of code wich was removed by comments. But if that example is good enough for loading all types of images then ill use that one in my code.

There is nothing else to say then that i am a totally noob when it comes to this type of stuff. So treat me like one when you reply. :) And that you'r library is truly awesome! Nothin like iv'e ever encountererd. :)


Thanks in advance for any suggestions, mojo
User avatar
xnview
Author of XnView
Posts: 45254
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: How to fill a BITMAPINFO structure?

Post by xnview »

mojo wrote:Hi,

How can I fill a BITMAPINFO structure from an image loaded with your already insane cool library? ;) What im trying todo is to use the function "StretchDIBits", wich requires a filled BITMAPINFO structure. I have looked at one of the examples in "\GflSDK\win32\example.c", function "GetDIBFromBitmap". This seems simple enough, but i noticed alot of code wich was removed by comments. But if that example is good enough for loading all types of images then ill use that one in my code.

There is nothing else to say then that i am a totally noob when it comes to this type of stuff. So treat me like one when you reply. :) And that you'r library is truly awesome! Nothin like iv'e ever encountererd. :)


Thanks in advance for any suggestions, mojo
With GetDIBFromBitmap, you have a good example how to convert GFL_BITMAP to a DIBHEADER
Pierre.
mojo

Post by mojo »

Thanks for the information. Then i'll just proceed with converting that example. :D