Working With Filters - Adobe 23101764 - Photoshop CS - PC Manual

Scripting guide
Hide thumbs Also See for 23101764 - Photoshop CS - PC:
Table of Contents

Advertisement

To restore a selection that has been saved to a selection, use the load (Load/load) method as
shown below.
AS:
load selection of current document from channel "My Channel" of ¬
VB:
selRef.Load docRef.Channels("My Channel"), psExtendSelection
JS:
selRef.load (docRef.channels["My Channel"], SelectionType.EXTEND);
See section
paste selections.

3.13 Working with Filters

To apply a filter, use the layer's filter command for AppleScript or the
ApplyXXX/applyXXX methods for Visual Basic and JavaScript. The following examples
apply the Gaussian blur filter to the active layer.
AS:
filter current layer of current document using Gaussian blur ¬
VB:
docRef.ActiveLayer.ApplyGaussianBlur 5
JS:
docRef.activeLayer.applyGaussianBlur(5);
3.13.1 Selecting channel(s) to filter
When applying filters, keep in mind they affect the selected channels of a visible layer. This
means that prior to running a filter, you may have to set the active channels. Since more than
one channel can be active at a time, you must provide an array of channels when setting a
channel. The code below demonstrates how to set the active channels to the channels named
"Red" and "Blue."
AS:
set current channels of current document to { channel "Red" of ¬
Photoshop CS Scripting Guide
current document combination type extended
3.17, "Clipboard interaction" on page 96
with options { radius: 5 }
current document, channel "Blue" of current document }
Scripting Photoshop
Working with Filters
for examples on how to copy, cut and
3
88

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs

Table of Contents