[SDL] Re: Converting between 32/24/16 Bit Mode to 8 Bit Mode ???

Thomas Harte T.Harte at SPAM.excite.SPAM.com.SP_AM
Sun Apr 8 12:20:54 PDT 2001


>When SDL converts from a direct colour mode like 32/24/16 bit to 8 bit
 palletized / indirect ) mode
>does it calculate every frame a new palette calculated on the colours that
it has to convert
>or does it use the same 256 Colour palette every time ??


Of course I am not the expert, but I was looking at the docs and examples
earlier, and I believe it uses whichever palette you have attached to the
video surface (i.e. the surface returned to SDL_GetVideoSurface). In
particular one of the tests included with 1.2.0 (the one that just shows a
BMP maybe) sets a 3:3:2 colour cube and includes a comment along the lines
of 'a better idea might be to investigate the source bitmap and pick a
palette specially for it' . . .

-Thomas






More information about the SDL mailing list