How to invert an Alpha Channel in JS
Hey Guys and Gal's,
I have a selected channel that I'm looking to invert but I'm not seeing to have any luck.
I've tried the below (Inverting the Red Channel in this case)
- app.activeDocument.activeChannels = [app.activeDocument.channels[0]];
- app.activeDocument.activeLayer.invert();
- app.activeDocument.activeChannels = [app.activeDocument.channels[0],app.activeDocument.channels[1],app.activeDocument.channels[2]];
I've also tried app.activeDocument.activeChannels.invert(); but also to no avail.
I even tried it in an action and it failed. can anyone direct me to the best way of doing this?
Thanks.
