Skip to main content
gamedev.net
🔒 Locked

newbee problem : bitmaps with 24bit

Started by edwinnie Apr 9, 2002 at 6:51 AM 2 replies 200+ views
Original Post
edwinnie
edwinnie
ok i am using the WGPFD book. i pasted some of the code for loading bitmaps. my bitmap is a 24bit one. when compiling, but it says that my bitmap has >256colors, so it couldnt load into the bitmap editor is there anything i need to modify from the pasted code so that the image will load up properly coz all i see is some fuzzy screen.
Dean Harding
Dean Harding
Not being familiar with WGPFD, I''m just guessing. It sounds to me like you''re trying to load the bitmap as resource, is that right? And when you try and open it in the editor, it won''t let you. There''s nothing you can do, the VC++ bitmap editor only supports 256-colour bitmaps.

I''m guessing from the wording of your question, so maybe I''m way off...


codeka.com - Just click it.
edwinnie
edwinnie
thanks aniwae
but thats half the problem solved

i noticed that if i change>
#define SCREEN_BPP 24 // bits per pixel
to
#define SCREEN_BPP 16 // bits per pixel

it kinda worked, but the image is like having CGA graphics,
wats wrong?


if it is>
#define SCREEN_BPP 24 // bits per pixel

the screen "tried to load" the image but the program immediately exited, probably due to a return(0);



[edited by - edwinnie on April 9, 2002 9:34:06 AM]
Insodus
Insodus
It sounds like you are loading a palleted bitmap and you are trying to display it on a 24-bti surface and its blowing up for some reason.

In general with textures, for speed and sanity purposes, try to make your texture files the same color type as you are going to be displaying it.
---------------------------------"Without C, all we would have is Pasal, Basi, and obol.""Black holes are where god divided by zero."http://www.insodus.com

Topic Locked

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

Sign in to reply to this topic.