beautypg.com

Create a document in matlab – Adobe Photoshop CC 2014 v.14.xx User Manual

Page 988

background image

Note:

To the top

Note:

W

H

R

N

M

F

A

B

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.

All MATLAB commands are supported for Japanese characters. MATLAB for Windows supports a Japanese language user interface on

Japanese language Windows XP systems. MATLAB for Mac OS supports US English only on Japanese language Mac OS systems. For more
information, contact The MathWorks, Inc.

Create a document in MATLAB

1. In MATLAB, enter psnewdoc.

2. To specify the attributes of the new document, enter one of the following:

To create a document using the default values, enter psnewdoc(). For information on default values, see below.

To create a 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.

Enter “undefined” as a string to skip input arguments. The default size for a new document is 504 x 360 pixels.

To create a 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 document and specifying all the attributes in MATLAB:

psnewdoc(10, 10, 72, 'hi', 'cmyk', 'transparent', 2.5, 16, 'U.S. Web Coated (SWOP) v2')

New document attributes and defaults

Entering psnewdoc(W,H,R,N,M,F,A,B,P) creates a document with values for the following attributes:

Specifies the width of the document using the current units from the Units & Rulers option in the Photoshop Preferences dialog box. The

default width is 504 pixels.

Specifies the height of the document using the current units in the Units & Rulers panel in the Photoshop Preference dialog box. The default

height is 360.

Specifies the resolution. The default is 72 ppi.

Specifies the document name. The default is Untitled-X, where X is the index for new documents.

Specifies the color mode: RGB, CMYK, Lab, Bitmap, or Grayscale. The default is RGB.

Specifies the background contents of the new document: White,Background Color, or Transparent. The default is White.

Specifies the pixel aspect ratio. The default is 1.0 (square).

Specifies the bit depth: 1, 8, 16, or 32. The default is 8.

981

This manual is related to the following products: