␡
- Viewing Photoshop CS2 objects, commands, and methods
- Creating new objects in a script
- Setting the active object
- Opening a document
- Saving a document
- Setting application preferences
- Suppressing dialog boxes
- Working with the Adobe Photoshop CS2 Object Model
- Working with color objects
- Working with filters
- Understanding clipboard interaction
- Working with units
- Sample workflow automation JavaScripts
- Advanced scripting
This chapter is from the book
Working with filters
To apply a filter, you use a specific filter method. For example, to apply a Gaussian blur filter, you use the applyGaussianBlur() method. All filter methods belong to the ArtLayer object.
The following example applies the Gaussian blur filter to the active layer.
docRef.activeLayer.applyGaussianBlur(5)
Other filters
If the filter type that you want to use on your layer is not part of the scripting interface, you can use the Action Manager from a JavaScript to run a filter. See Part 2 of this book for information on using the Action Manager.