How are you guys reading in bitmaps?
Hey there, just wondering what you guys are doing for reading in bitmaps? I''m trying to just skip the header info and read the color info right into an array (for OpenGL). I can''t seem to get it to line up correctly in the array though (what should be green ends up as red).
Should be 00 FF 00
But is FF 00 00 in the array.
Anybody have any code samples or web sites I can take a look at? Thanks a ton,
~S''Greth
ERROR: Your beta-version of Life1.0 has expired. Please upgrade to the full version. All important social functions will be disabled from now on.
Hi,
I think that bitmaps are saved dword aligned.
The Rock
-BAD software-
http://members.spree.com/entertainment/bad_software/
I think that bitmaps are saved dword aligned.
The Rock
-BAD software-
http://members.spree.com/entertainment/bad_software/
Why are you using MadKeith's sig? Or maybe he's using yours?
Bitmaps are stored DWORD aligned (as glROCKS pointed out) and many of them are also stored upside down (why they do that I do not know though).
A good description of the bmp format can be found at Wotsit.
Do you have Tricks of the Windows Game Programming Gurus? The author has some code in there that will load a bitmap into a byte array (just got it working today btw ). If you want it, I can e-mail it to you, but there's no code to actually draw the bitmap (but that wasn't what you asked for ).
- Muzzafarath
Mad House Software
The Field Marshals
Edited by - Muzzafarath on July 11, 2000 10:36:06 AM
Edited by - Muzzafarath on July 11, 2000 10:38:01 AM
Bitmaps are stored DWORD aligned (as glROCKS pointed out) and many of them are also stored upside down (why they do that I do not know though).
A good description of the bmp format can be found at Wotsit.
Do you have Tricks of the Windows Game Programming Gurus? The author has some code in there that will load a bitmap into a byte array (just got it working today btw ). If you want it, I can e-mail it to you, but there's no code to actually draw the bitmap (but that wasn't what you asked for ).
- Muzzafarath
Mad House Software
The Field Marshals
Edited by - Muzzafarath on July 11, 2000 10:36:06 AM
Edited by - Muzzafarath on July 11, 2000 10:38:01 AM
Hey that would be great if I could take a look at that code! I already took a look at wotsit (man I love that site). Sorry about re-posting that sig, but I saw it that other day and I thought it was the funniest damn sig I''ve seen in quite a while. Won''t post it again though Thanks a ton Muzzafarath!
~S''Greth
~S''Greth
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement