Color Depth and images

Hi to all,
what’s happen if I load a 24 bit image
in a screen set to 16 bit color depth?

SDL automatic convert it and display without slowy performance?

Thanks

Hi to all,
what’s happen if I load a 24 bit image
in a screen set to 16 bit color depth?

SDL automatic convert it and display without slowy performance?

If you use SDL_BltSurface to copy a 24 bit surface into a 16 bit surface
SDL will convert it for you. But, it will slow you down a lot.

	Bob PendletonOn Mon, 2003-12-08 at 13:23, Alessandro Ardolino wrote:

Thanks


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±--------------------------------------+

If you want to prevent SDL_BlitSurface from making a time consuming
conversion every time its called, then use SDL_DisplayFormat to convert
your image to the screen’s depth when you load it.
(And don’t forget to free the old surface after calling
SDL_DisplayFormat. or you have a leak on your hands!)On Dec 8, 2003, at 5:39 PM, Bob Pendleton wrote:

On Mon, 2003-12-08 at 13:23, Alessandro Ardolino wrote:

Hi to all,
what’s happen if I load a 24 bit image
in a screen set to 16 bit color depth?

SDL automatic convert it and display without slowy performance?

If you use SDL_BltSurface to copy a 24 bit surface into a 16 bit
surface
SDL will convert it for you. But, it will slow you down a lot.

  Bob Pendleton