Hello All!
How can I add information about alpha-channels to parametres to dialog box?
or delete everything except CMYK
Info about Alpha-Channels
- Stephen_A_Marsh
- Posts: 38
- Joined: Sun Aug 04, 2019 12:37 pm
Re: Info about Alpha-Channels
I'm a little late to the party, however, I hope this helps @klevteev or somebody else...
Code: Select all
// CMYK mode file: remove all channels except for the composite channel
if (documents.length > 0) {
if (activeDocument.mode == DocumentMode.CMYK) {
try {
for (var i = activeDocument.channels.length - 1; i >= 0; i--) {
if (activeDocument.channels[i].kind != ChannelType.COMPONENT) {
activeDocument.channels[i].remove();
}
}
} catch (e) {}
}
} else {
alert("There must be at least one open document to run this script!");
}