Archived

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

How to make a BMP loader?

This topic is 5590 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 am currently reading NeHe Tutorial 6 and it uses GLaux.I have heard that GLaux is dead and not to use it, so I want to make my own BMP loader.I have downloaded the file format specifications(for BMP) from http://www.wotsit.org but have no clue how to make my own BMP loader.So any help, tutorials would be great. Thanks in advance. [edited by - OzzyOsbourne on August 28, 2002 10:24:18 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Sounds like a serious case of reinventing the wheel...;-)

Unless you want to write a BMP loader for the learning experience, try the LoadImage() API function, with the LR_LOADFROMFILE flag.

Share this post


Link to post
Share on other sites
quote:
Original post by OzzyOsbourne
Yes, I would like to create it for the learning experience.So, can anybody help me out?


Don''t get this wrong - I know what it feels like when you don''t know how to do something. However, the question here is a very common one and loads of information can be found on the Net. If you want to do it for learning experience only, try searching the Web and really writing it all by yourself. I did this once - it seemed intimidating at first, but it''s really not. Search for phrases like "bmp format description" and try to make out the official documentation - you''ll learn a lot. Asking the question here seems like you simply want to find the code and read it(, and thus learn it ?). A fair warning - if you''re a novice or don''t know much about stuff like this, stick to 24-bit bitmaps and avoid RLE compression and all kinds of palette "troubles" you''ll encounter with 8-bit uncompressed bitmaps.

Crispy

Share this post


Link to post
Share on other sites
I got a pair of bmp loaders one using windows api and another reading the file format directly, if you want one of them , or both, request at my email address

Share this post


Link to post
Share on other sites
quote:
Original post by OzzyOsbourne
I am currently reading NeHe Tutorial 6 and it uses GLaux.I have heard that GLaux is dead and not to use it, so I want to make my own BMP loader.I have downloaded the file format specifications(for BMP) from http://www.wotsit.org but have no clue how to make my own BMP loader.So any help, tutorials would be great.
Thanks in advance.

[edited by - OzzyOsbourne on August 28, 2002 10:24:18 AM]


I have an old one I wrote for DOS when I started programming (it in Qbasic).

Share this post


Link to post
Share on other sites
Parsing any file such as a BMP is just a matter of reading the documentation. Most formats have documentation that describes in depth what each byte is, when sections are excluded, etc... Just read the papers top to bottom and read the file top to bottom.

Share this post


Link to post
Share on other sites