Palette tips stroke tricks

Hi, being a bit lazy i thought i’d ask here before i start winding myself up
tring to go head first into it with some crazy method that could be done
simpler…

so…

is there any way i can just plot one color of a surface into another, basically
i want to be able to get the part of the surface i want transparent into
another surface.

ie. if i have my bitmap with the transparent part as full red blue ( bright pink
) i can just plot all the pixels of that colour into another surface the same
size so i can keep a sperate shape of the transparancy bits.

does this make sence?

i hope this makes sence.

thanks.

Hullo,On Wed, 27 Jun 2007 22:18:15 +0100 neil at cloudsprinter.com wrote:

is there any way i can just plot one color of a surface into another, basically
i want to be able to get the part of the surface i want transparent into
another surface.

ie. if i have my bitmap with the transparent part as full red blue ( bright pink
) i can just plot all the pixels of that colour into another surface the same
size so i can keep a sperate shape of the transparancy bits.

does this make sence?

nope :o)

Ok, what it SOUNDS like to me (operating on 4h sleep, tho), is you’re asking
for one of two things:

EITHER
a)You want some sort of strange reverse-chromakeying thing, where you add
transparent pixels to the target image, and not any proper image pixels that
may be in the source image. I’m not quite sure why you might want such a
thing, maybe to make the target image disappear incrementally or something?

I’m also not sure how you’d implement this with the standard library things,
unless the non-transparent pixels are going to be all one colour (ie: just
two colours for whole source surface), in which case you could maybe use
a different chromakey for the source surface, uh, or something like that,
which I think MIGHT be possible, I’ve not tried anything like that before,
and not sure how to explain that.
Otherwise, you’d probably be able to implement this with a specialised
blitter, which shouldn’t really be too hard I expect.

OR,
b)You really want ordinary chromakeying/colourkeying, but are describing
it backwards, or at least in a way that sounds backwards to me ATM, in
which case just see the docs for the SDL_SetColorkey() function (base SDL
library).
If you’re not already familiar with that, have a read anyway and maybe try it
out with a little test code or such, it’s really easy to use (I forget ATM
whether you need to use a paletted source surface for it tho)

If the answer’s still “a” or “none of the above” though, you might want to
clarify a bit further anyhow.

Hope this helps a bit :slight_smile:
-Tom Barnes-Lawrence (taking a welcome short break from a difficult non-SDL
based problem)

I think I need a new signature

right i’d had a glass of wine last night, and sent off the email while
is was in
my head, it’s now the morning after so i still have an excuse for not
making any
sence, but i’ll try and clarify what it is that i am trying to do.

i have a load of images that are just greyish white, i want to use some alpha
bleneded colured textures to plot over these to give them colors and with a
little random plotting different textures each time, after i have plotted over
the image to give it its texture, the ‘outside’ of the image will no longer be
a solid color, therefore i want to put the original area of transparancy back,
so i’d like rather than creating alot of seperate bitmaps of where the
transparancy should be, extract the area of transparancy i will be wanting
before i add the colour / texture then re plot the transparancy area, then use
the colourkey function to make it actually transparent.

erm… again… i hope this makes (more) sence :wink: