Skip to main content
GameDev.net gamedev.net
🔒 Locked

bitmaps in general

Started by klayAlloy Jan 25, 2006 at 2:09 PM 0 replies 250+ views
Original Post
klayAlloy
klayAlloy
I've been working on bitmaps for a few days now and i've got a really basic class up and running. Basically it creates a handle to a bitmap using the LoadGraphic() function. I researched all over online and found a few tutorials about reading bitmap files using the tagBitmapFileHeader, tagBitmapInfoHeader, and RGBQuad structs to actually read the file and pull out the data. One of the tutorials, posted on gamedev uses a class to open up a file and read it. Here is the URL: http://www.gamedev.net/reference/articles/article1966.asp The class stores all of the data in the structs and there is a member variable, char* data which ends up holding the bitmap info. The tutorial doesn't teach how to use that data and it is probably assumed how. I researched that some and found a function CreateBitmapIndirect(), which takes as a parameter a BITMAP struct type and returns a HBITMAP. One of the members of BITMAP holds the bitmap data. I guess my question would be, do I need to include the BITMAP struct in my class, have it hold the char* data from the tutorial, and use CreateBitmapIndirect() to get the HBITMAP? I can use the HBITMAP to use and display bitmaps, that's what my simple class does now. Another question about the CreateBitmapIndirect() the MSDN library says that the bitmap created is device dependent and I want a device-independent? Does that really matter if all i'm using the bitmap for is to blit it to the screen? Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.