When I have a 32-bit image on a 16-bit PC, simply calling
SDL_CreateRGBSurfaceFrom (with 32 in its arguments) and then blitting it
to my 16-bit screen seems to do the job just fine. Is there a similar
way to do this with 256 colors? Or do I have to grab every pixel and
asign a palette index to it manually?
BTW, I don’t have the actual image, I just have its pixel data.
Manuel Garc?a Cabrera escribi?:> When I have a 32-bit image on a 16-bit PC, simply calling
SDL_CreateRGBSurfaceFrom (with 32 in its arguments) and then blitting it
to my 16-bit screen seems to do the job just fine. Is there a similar
way to do this with 256 colors? Or do I have to grab every pixel and
asign a palette index to it manually?
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Manuel Garc?a Cabrera wrote:
When I have a 32-bit image on a 16-bit PC, simply calling
SDL_CreateRGBSurfaceFrom (with 32 in its arguments) and then blitting it
to my 16-bit screen seems to do the job just fine.
Why don’t you do the same with 256 colors ? SDL will map to the palette
accordingly (it might look bad, but that’s what you get at 8bbp anyway :).
Stephane
I tried, but I must call SetColors, right? And how can I call set colors
if I don’t know which palette I’ll use?
Stephane Marchesin escribi?:> Manuel Garc?a Cabrera wrote:
When I have a 32-bit image on a 16-bit PC, simply calling
SDL_CreateRGBSurfaceFrom (with 32 in its arguments) and then blitting it
to my 16-bit screen seems to do the job just fine.
Why don’t you do the same with 256 colors ? SDL will map to the palette
accordingly (it might look bad, but that’s what you get at 8bbp anyway :).Stephane
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
If you have a raw 8 bit image with no pal associated with it you’ll need to
find a proggy that lets you play with the palette real time, or write an app
that does it.
Ha ha.
-WillOn 6/6/07, Manuel Garc?a Cabrera wrote:
I tried, but I must call SetColors, right? And how can I call set colors
if I don’t know which palette I’ll use?Stephane Marchesin escribi?:
Manuel Garc?a Cabrera wrote:
When I have a 32-bit image on a 16-bit PC, simply calling
SDL_CreateRGBSurfaceFrom (with 32 in its arguments) and then blitting
it
to my 16-bit screen seems to do the job just fine.
Why don’t you do the same with 256 colors ? SDL will map to the palette
accordingly (it might look bad, but that’s what you get at 8bbp anyway
:).Stephane
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org