So after some further work on it I figured out how to mess with the channels and I think I have some progress I will continue to post my updates as I work to fixing this.
open(File(openDialog())); var docRef_1 = activeDocument
docRef_1.backgroundLayer.duplicate();
var channelRefred = app.activeDocument.channels.getByName("Red");
var channelRefgre = app.activeDocument.channels.getByName("Green");
var channelRefblu = app.activeDocument.channels.getByName("Blue");
//gets red channel
//channelRefblu.visible = false;
//channelRefgre.visible = false;
//selects copys red channel
app.activeDocument.selection.load(channelRefred)
app.activeDocument.selection.copy()
//pastes red layer
app.activeDocument.selection.selectAll()
app.activeDocument.paste()
//turns on green and red off
//channelRefgre.visible = true;
//channelRefred.visible = false;
//copies green channel
app.activeDocument.selection.load(channelRefgre)
app.activeDocument.selection.copy()
//selects copys red layer
app.activeDocument.selection.selectAll()
app.activeDocument.selection.copy()
//pastes red layer
app.activeDocument.selection.selectAll()
app.activeDocument.paste()
No comments:
Post a Comment