Adobe Photoshop CS5 Object Library JS: Channel
From Photoshop CS5
Channel
Object that stores information about a color element in the image, analogous to a plate in the printing process that applies a single color. The document's color mode determines the number of default channels. For example, an RGB document has four default channels: A composite channel: RGB; and three component channels: red, green, and blue. A channel can also be an alpha channel, which stores selections as masks; or a spot channel, which stores spot colors.QuickLinks
duplicate, duplicate, merge, remove, removeAllHierarchy
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| color | SolidColor | r/w | The color of the channel. Not valid for component channels. |
| histogram | Array of int | readonly | A histogram of the color of the channel. |
| kind | ChannelType: ChannelType.COMPONENT ChannelType.MASKEDAREA ChannelType.SELECTEDAREA ChannelType.SPOTCOLOR |
r/w | The type of channel. |
| name | string | r/w | The channel name. |
| opacity | number | r/w | The opacity of alpha channels (called solidity for spot channels). Range: 0 to 100. Valid only when 'type' = masked area or selected area. |
| parent | Object | readonly | The object's container. |
| typename | string | readonly | The class name of the object. |
| visible | bool | r/w | If true, the channel is visible. |
Methods
Instances
Channel duplicate (relativeObject:
Object, insertionLocation:
ElementPlacement)
Duplicate this object.
| Parameter | Type | Description |
|---|---|---|
| relativeObject | Object | |
| insertionLocation | ElementPlacement: ElementPlacement.PLACEAFTER ElementPlacement.PLACEBEFORE ElementPlacement.PLACEATEND |
Channel duplicate ([targetDocument:
Document])
Duplicates the channel.
| Parameter | Type | Description |
|---|---|---|
| targetDocument | Document | The document to duplicate the channel to. (Optional) |
void merge ()
Merges a spot channel into the component channels.
void remove ()
Deletes this object.
void removeAll ()
Deletes all elements.
Element of
Document.activeChannels
Document.componentChannels
LayerSet.enabledChannels
Used in:
void Document.autoCount (channel: Channel, threshold: int)
void Selection.load (from: Channel[, combination: SelectionType=SelectionType.REPLACE][, inverting: bool=false])
void Selection.store (into: Channel[, combination: SelectionType=SelectionType.REPLACE])
Return
Channel Channel.duplicate (relativeObject: Object, insertionLocation: ElementPlacement)
Channel Channel.duplicate ([targetDocument: Document])
Channel Channels.[] (index: uint)
Channel Channels.add ()
Channel Channels.getByName (name: string)
| Jongware, 28-Aug-2012 v3.0.3i | Contents :: Index |