I've been trying to script something that seems relatively simple, yet I've
spent the better part of today stuck at one little step.  I have started
naming things with curse words, so I figured I'd reach out for help before I
start throwing things.

I have a layer that I want to serve as the mask for another layer.  The
values in the mask layer are white, so in theory, I could do the

;Somehow get the green Channel of the mask layer

(set! greenChannelMask [magicFunctionHere])

(gimp-layer-add-mask myLayer greenChannelMask)

I'm sure there's a more elegant way of doing it.  If so, please let me
know.  However, if the above would work, I just need to know how to get that
channel.  Should be easy, but I have been beating my head agaist a wall.  I
just can't get it.  I tried 'gimp-image-get-channels' in the console just to
see if I could do it the hard way, but it always returns '(0 #()#0"")', no
matter what image, which leads me to believe I don't understand how that
function works.  I also tried 'gimp-image-get-active-channel' in the
console, but that comes back with -1.  All the time.

I probably wouldn't be so frustrated if this was a big deal, but should be
easy to get the channel, yet I've burned much of the day and have made no
other progress (other than, of course, having nowhere else to look).

Thanks in advance,
Gimp-developer mailing list

Reply via email to