🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Why the bitmap inclined

Started by
2 comments, last by Benjamin Wong 24 years, 6 months ago
Hi I am a beginner in game programming. I have read the book Windows Game Programming for Dummies. And try to load my own bitmap use the function inside the book. I found the bitmap is not just inverted but also inclined. Could anyone tell me what''s happen and how could I do? Thanks
Little Joker
Advertisement
I don''t know the book you''re talking about, but the bitmap being inclined sounds like a problem with the pixel row padding. In a bitmap, every row of pixels should be padded to reach a multiple of four. If your store/load function doesn''t take this into account when displayed the bitmap may be skewed.
Every scanline should be padded to a DWORD.

Check ut my homepage for some reference about this.

It''s in the bitmap write function....(you can use the same for loading, but don''t write *LOL*)

Dance with me......

http://members.xoom.com/CJdeVos/index.htm

I ahd that problem too. You need to make sure your bitmap''s dimensions are powers of 2 and that the color depth is 8 bits per pixel. Lamoth''s engine won''t load RLE bitmaps either so get Paint Shop Pro and save in RGB format.

This topic is closed to new replies.

Advertisement