Adobe 23101764 Scripting Guide - Page 57
With the width and height of the array thus de
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 57 highlights
Scripting Photoshop 3 Advanced Scripting Applying a Wave Filter Now that text displays on your document, you're ready to apply some special effects. First, redefine the width and height of the document in pixels. Additionally, convert the text layer to pixels -- we do this because text is a vector graphic and we need a bitmap in order to manipulate the image. Next create an array to specify the area to be selected for image manipulation. Notice that the array of points begins at the top left corner of the dialog and extends half way across the document. Other array values define vertical positioning. With the width and height of the array thus defined, select the left side of the document. "Ants marching up the page" delimit the area selected. You can now apply a wave filter to the selection. A truncated sin curve carries the text along for a roller-coaster-like ride. set theDocWidthInPixels to theDocWidthInInches *¬ theDocResolution set theDocHeightInPixels to theDocHeightInInches *¬ theDocResolution rasterize theTextLayer affecting text contents set theSelRegion to {{0, 0}, ¬ {theDocWidthInPixels / 2, 0}, ¬ {theDocWidthInPixels / 2, theDocHeightInPixels}, ¬ {0, theDocHeightInPixels}, ¬ {0, 0}} select theDocRef region theSelRegion combination type replaced filter current layer of theDocRef using wave filter ¬ with options {class:wave filter, number of generators:1 ¬ , minimum wavelength:1, maximum wavelength:100, ¬ minimum amplitude:5, maximum amplitude:10 ¬ , horizontal scale:100, vertical scale:100 ¬ , wave type:sine, undefined areas:repeat edge pixels,¬ random seed:0} Photoshop CS Scripting Guide 53