Hello, I finally got SDL Linked up and ready to go and am now disecting the code as much as i can from lazyfoo's site. So i was wondering. screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );
I was wondering why is it that when i change the 32 bit to something like 8 bit. my image still shows colors. I was expecting it to be grayscale at 8bit.
EDIT: And why the program crashes when i try to go below 8bit like 4 and 2 and 1 bit?
I may be wrong, but I think 8 bit colour works with a palette. So, rather than referring to actual RGBA values as with 16bit/32bit colour modes, the 8 bit colour codes just refer to predefined colour values in a table.
Well 32bit colour is the standard now, I think. I don't see why you would want to go lower. I assume it saves memory, but that's not as important nowadays. 32bit will presumably be higher quality.
EDIT: Forget that thing about 64 bit colours. I was thinking of something else.
no no i understand that, what i am trying to say is that i see no difference on the screen when i use 8bit and 32 bit color and am just curious as to why
I Thought 8 bit only means it supports the grayscale colors. So you can use any color in the world on 8 bit as long as the whole image within 256 colors?
Sorry. I wasn't very clear. I'm pretty sure it's not quite like that. The palette is predefined so no, I don't think it would be the case with any image with only 256 colours. I was just wondering if your image only contained colours from the palette.