Archived

This topic is now archived and is closed to further replies.

Using Compressed Bitmaps

This topic is 5013 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I found a bitmap loader that I''m trying to use for a 2D project/ However, it seems that it only works for uncompressed bitmaps. are there any programs for decompressing bitmaps or do I need to get down and dirty and mess with RLE compression. Thanx for any answers. With great power comes great reponsibility.

Share this post


Link to post
Share on other sites
If this game is only targetting windows, it would probably be easiest to use the windows LoadImage function with the LR_LOADFROMFILE flag.

If you need crossplatform compatibility, you'll have to write your own. This article at codeproject has an implementation that you can base yours on. Download the code and check out ximabmp.cpp. You can't stick it straight in though, it uses some custom classes that you'll have to remove first.

EDIT: ximabmp.cpp, not xwimabmp.cpp

[edited by - Melekor on March 22, 2004 9:52:26 PM]

Share this post


Link to post
Share on other sites
THanx for the resonse. I was just wonderin. The code I found for the bitmap loader was basically the code in NeHe Opengl tutorial encapsulated into a class. Even though his example works with the bmp he gives, does it work with compressed pics? If so, how does it do it? or do you have to add that funtionality your self? Thanx again.

Share this post


Link to post
Share on other sites