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

Loading bitmaps

Started by darekw1 Sep 28, 2002 at 1:57 PM 3 replies 200+ views
Original Post
darekw1
darekw1
I''m reading Tricks of Windows Game Programming Gurus and I have a problem with loading my own bitmaps. In chapter7 Andre is loading his own bitmaps and they load fine but when I want to create and load my own bitmaps I get wrong colors. I use Paint Shop Pro 7 and I must be doing something wrong when I create background or sprites. Has anyone have any answer to my problem? Why seemingly same bitmaps one Andre''s and one created by me have different results at execution? Ps: It has nothing to do with the error Andre has made when scanning bitmaps dest_ptr += (ddsd.lPitch);//instead of dest_ptr += (ddsd.dwWidth);
Big Sassy
Big Sassy
Can you show a picture of what it looks like normally and what it looks like when loaded?
SwSh
SwSh
If you''re writing your own .bmp loading function, try to convert the bitmap imagedata from bgr to rgb at loading time. (just like for .tga files) Maybe that''ll work.


Click NOW!
EAX
EAX
Perhaps your bitmaps are using a different color palet than previousely loaded bitmaps. try using the same color palet for every bitmap you create.
EAX
darekw1
darekw1
You were right !
I was using two different pallets for the same image.
Thank you all for advise.

Topic Locked

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

Sign in to reply to this topic.