On Monday 17 December 2001 20:18, [EMAIL PROTECTED] wrote:
> <snip>
> Is there some combination of existing functions that would let
> you re-compose an image as:
>     0% red, 50% green, 50% blue  (i.e., a red-blocking filter)
> Is there some way to use blending of layers and opacity to do
> this?  Or some other tools or scripts?

Maybe this is more a question for gimp-user, but since it's here...It's 
possible, but a bit tricky. Here's what I can come up with (using your 
0:50:50 example):

Decompose the image into R, G and B images.

For each channel image, add a greyscale layer, black for 0% for that channel, 
white for 100%, or anything in between. In your example, red would get a 
black layer on top while red and green would get 128,128,128-coloured layers.

Set the layer mode on these new layers to multiply.

Flatten the R, G and B images.

Create a new image the size of the others, and add three layers, a red one 
(255, 0, 0), a green one (0, 255, 0) and a blue one (0, 0, 255). Set the 
layer mode to addition for the topmost two layers. Now add layer masks to 
each of the layers, and paste the corresponding channel image into the layer 

In your example, this would give you 0*R + 0.5*G + 0.5*B, which is the image 
you're after.

The only problem I can see is that you might run into rounding errors, 8 bits 
isn't that much accuracy, but given the simplicity of the operation I think 
you should be fine.

I think this would also be easy to make into a script, but I'll leave that to 
someone else.

Gimp-developer mailing list

Reply via email to