// =======================================================
var image = app.activeDocument;
var background = app.activeDocument.artLayers.getByName("Background");
background.duplicate();
background.visible = false;
var copy = image.artLayers.getByName("Background copy");
var newLayer = image.artLayers.add();
var newLayer = image.artLayers.add();
var Layer1 = image.artLayers.getByName("Layer 1");
var Layer2 = image.artLayers.getByName("Layer 2");
image.activeLayer = copy;
var redChannel = image.channels.getByName("Red");
var arrayRed = new Array (redChannel);
image.activeChannels = arrayRed;
image.selection.selectAll();
image.selection.copy();
image.activeLayer = Layer1;
image.paste();
var greenChannel = image.channels.getByName("Green");
var arrayGreen = new Array (greenChannel);
image.activeChannels = arrayGreen;
image.selection.selectAll();
image.selection.copy();
image.activeLayer = Layer2;
image.paste();
image.activeLayer.blendMode = BlendMode.SCREEN;
Layer2.opacity = 50;
copy.visible = false;
image.mergeVisibleLayers();
image.selection.selectAll();
image.selection.copy();
copy.visible = true;
image.activeLayer = copy;
var redChannel = image.channels.getByName("Red");
var arrayRed = new Array (redChannel);
image.activeChannels = arrayRed;
image.paste();
var greenChannel = image.channels.getByName("Green");
var arrayGreen = new Array (greenChannel);
image.activeChannels = arrayGreen;
image.paste();
var RGBChannel = image.channels.getByName("RGB");
image.activeChannels = arrayRGB;
No comments:
Post a Comment