using layer/channel as mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 following...

;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,
-Kevin
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux