Channels

A collections class allowing for array access into a document's channels, while also providing familiar methods from ExtendScript, like getByName

// Iterate through all channels in the document
app.activeDocument.channels.forEach(h => console.log(h.name));

Fixes in Photoshop 24.6

Indexable

▪ [index: number]: Channel

Used to access the channels in the collection

// Iterate through all channels in the document
app.activeDocument.channels.forEach(h => console.log(h.name));

Fixes in Photoshop 24.6

Properties

Name
Type
Access
Min Version
Description
length
number
R
23.0
Number of Channel elements in this collection.
parent
Document
R
23.0
The owner document of this Channel collection.
typename
string
R
23.0
The name for this object collection: Channels.

Methods

add

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.0</span>

<br/> Channel

Create a new alpha channel in this document.

getByName

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.0</span>

<br/> Channel

Find the first channel with the matching name.

Fixes in Photoshop 24.6

Parameters

Name
Type
name
string

removeAll

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.0</span>

<br/> void

Remove all Alpha channels in the parent document.