Converting between 32/24/16 Bit Mode to 8 Bit Mode?

A question about the conversion procedure of SDL :

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 ??

CU

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

“Thomas Harte” <T.Harte at excite.com> schrieb im Newsbeitrag news:9aqdmm$4pm$1 at ftp.lokigames.com

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’ . . .

Todays most computers have 16/24/32 Bit but some older ones like the AMIGA1200
have only 8Bit. Allegro uses the same conversion techn., it also converts to 3:3:2 and
that looks always sh… :=)

CU> -Thomas