Hi,buddy:
I got a book and it says that in the palletized modes,8 bits represent each pixel,problem is that if we get over 8 bits,e.g:16 bits,how could we still use palletized mode?
Thx
Hi,buddy:
I got a book and it says that in the palletized modes,8 bits represent each pixel,problem is that if we get over 8 bits,e.g:16 bits,how could we still use palletized mode?
Thx
Palettes are actually preset. I'm not familiar with the mode you are talking about but if it only allows 8-bit colors then you can't use 16-bit colors. Either windows will degrade the color down to 8-bit (which would supprise me), or you would get an error (much more likely). If it says 8-bit then just use 8-bit.
eh, is it possible to use palettized mode in with 16-bits desktop depth at all?
Use CreatePalette / SelectPalette.
To do the coloring of specific elements, I use to manipulate the COLORREF structure, which expects 4 bytes (0xIIRRGGBB) RGB( INTENSITY, RED, GREEN, BLUE ), you can set pixels up to 24 bits colordepth. Intensity byte has to be left 0.
Just to give you an idea, red, green and blue components can be modified through masking techniques (bitwise AND "&" / OR "|" and SHift Left "<<" SHift Right ">>"), which let you make some cool effects, too.
Have fun!
[R]evolution!
Programming related articles, downloads, demos