Hi there,
I’ve this image in two colors (one black, the other is the colorkey), and I
would like to know the simplest and fastest way to blit it in another color.
I’m using a 32 bit depth for screen, so I guess color mapping is out of
question (or is it not?). I’d also like to avoid caching, since I want to
change the color every frame…
It is possible to change the alpha on the fly using SDL_SetAlpha(). Any way
such as simple and fast to change another color component?
Cheers,
Ricardo–
Anoint, v.:
To grease a king or other great functionary already
sufficiently slippery.
– Ambrose Bierce, “The Devil’s Dictionary”
Ricardo Cruz wrote:
Hi there,
I’ve this image in two colors (one black, the other is the colorkey), and I
would like to know the simplest and fastest way to blit it in another color.
I’m using a 32 bit depth for screen, so I guess color mapping is out of
question (or is it not?). I’d also like to avoid caching, since I want to
change the color every frame…
You could load the image(s) you want to cycle colours on, into a 8 bit
palett-ised surface. Simply change the colour in the palette before you
blit to the screen.
- Tom> It is possible to change the alpha on the fly using SDL_SetAlpha(). Any way
such as simple and fast to change another color component?
Cheers,
Ricardo