Matlab commands (photoshop extended) – Adobe Photoshop CS3 User Manual
Page 598

PHOTOSHOP CS3
User Guide
591
7
Click Apply and then OK.
Connect/disconnect to Photoshop from MATLAB (Photoshop Extended)
❖
In MATLAB, do one of the following:
•
To launch or connect to Photoshop, type pslaunch, and then press Enter (Windows) or Return (Mac OS).
•
To disconnect from Photoshop and quit, type psquit and press Enter (Windows) or Return (Mac OS).
Using help and getting started (Photoshop Extended)
MATLAB’s help system includes examples of a MATLAB/Photoshop workflow.
1
Choose Help > Full Product Family Help.
You will see a Photoshop Toolbox with submenu items, including Examples for getting started. If you don’t see the
Photoshop Toolbox, try the following steps.
2
Click the Start Button.
3
Choose Desktop Tools > View Source Files.
4
Click the Refresh Start button, then Close, then retry the Help menu.
MATLAB commands (Photoshop Extended)
Typing commands in the MATLAB command line lets you connect and disconnect to Photoshop, and generate
pixels viewable in a Photoshop document.
For a list of all MATLAB Photoshop commands, browse the file psfunctionscat.html, available in the MATLAB
folder in the directory where you installed Photoshop. Enter help (command name) at the MATLAB command
prompt for a fuller description of each command, including syntax, arguments, and examples.
Note: All MATLAB commands are supported for Japanese characters. MATLAB for Windows supports a Japanese
language user interface on Japanese language WinXP systems. MATLAB for Mac OS supports US English only on
Japanese language Mac OS systems. For more information, please contact The MathWorks, Inc.
Create a new document in MATLAB (Photoshop Extended)
1
In MATLAB, enter psnewdoc.
2
To specify the attributes of the new document, enter one of the following:
•
To create a new document using the default values, enter
psnewdoc()
. For information on default values, see
below.
•
To create a new document with a specific width and height, enter
psnewdoc(W,H)
. The W and H values use the
current units set in the Units & Rulers option in the Photoshop Preferences dialog box. Other document attributes
are set to their default values.
Note: Enter “undefined” as a string to skip input arguments. The default size for a new document is 504 x 360 pixels.
•
To create a new document and specify attributes, enter
psnewdoc(W,H,R,N,M,F,A,B,P)
. For information on
new document attributes, see below.
Here is an example code for creating a new document and specifying all the attributes in MATLAB:
psnewdoc(10, 10, 72, 'hi', 'cmyk', 'transparent', 2.5, 16, 'U.S. Web Coated (SWOP) v2')