Edit in GitHubLog an issue

Channels

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

Copied to your clipboard
1// Iterate through all channels in the document
2app.activeDocument.channels.forEach(h => console.log(h.name));

Fixes in Photoshop 24.6

  • Component channels should work now correctly in non-English localizations
  • Channel should be now returned correctly in Bitmap and Indexed Color modes

Indexable

▪ [index: number]: Channel

Used to access the channels in the collection

Copied to your clipboard
1// Iterate through all channels in the document
2app.activeDocument.channels.forEach(h => console.log(h.name));

Fixes in Photoshop 24.6

  • Component channels should work now correctly in non-English localizations
  • Channel should be now returned correctly in Bitmap and Indexed Color modes

Properties

NameTypeAccessMin VersionDescription
length
number
R
23.0
Number of Channel elements in this collection.
parent
R
23.0
The owner document of this Channel collection.
typename
string
R
23.0
The name for this object collection: Channels.

Methods

add

23.0

Channel

Create a new alpha channel in this document.


getByName

23.0

Channel

Find the first channel with the matching name.

Fixes in Photoshop 24.6

  • *Non-English locales return correctly for component channels.

Parameters

NameType
name
string

removeAll

23.0

void

Remove all Alpha channels in the parent document.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.