Constants
Enumerations#
AnchorPosition#
The point around which to transform an object.
This is the point that does not move when an object is rotated or resized
| Name | Description |
|---|---|
| BOTTOMCENTER | - |
| BOTTOMLEFT | - |
| BOTTOMRIGHT | - |
| MIDDLECENTER | - |
| MIDDLELEFT | - |
| MIDDLERIGHT | - |
| TOPCENTER | - |
| TOPLEFT | - |
| TOPRIGHT | - |
BMPDepthType#
Number of bits per channel (also called pixel depth or color depth).
The number selected indicates the exponent of 2.
| Name | Description |
|---|---|
| EIGHT | - |
| FOUR | - |
| ONE | - |
| SIXTEEN | - |
| THIRTYTWO | - |
| TWENTYFOUR | - |
BitmapConversionType#
Specifies the quality of an image you are converting to bitmap mode. Used in BitmapConversionOptions
| Name | Description |
|---|---|
| CUSTOMPATTERN | - |
| DIFFUSIONDITHER | - |
| HALFTHRESHOLD | - |
| HALFTONESCREEN | - |
| PATTERNDITHER | - |
BitmapHalfToneType#
Specifies the shape of the dots (ink deposits) in the halftone screen. Used in BitmapConversionOptions
| Name | Description |
|---|---|
| CROSS | - |
| DIAMOND | - |
| ELLIPSE | - |
| LINE | - |
| ROUND | - |
| SQUARE | - |
BitsPerChannelType#
The number of bits per color channel.
| Name | Description |
|---|---|
| EIGHT | - |
| ONE | - |
| SIXTEEN | - |
| THIRTYTWO | - |
BlendMode#
Blending mode
| Name | Description |
|---|---|
| COLOR | - |
| COLORBURN | - |
| COLORDODGE | - |
| DARKEN | - |
| DARKERCOLOR | - |
| DIFFERENCE | - |
| DISSOLVE | - |
| DIVIDE | - |
| EXCLUSION | - |
| HARDLIGHT | - |
| HARDMIX | - |
| HUE | - |
| LIGHTEN | - |
| LIGHTERCOLOR | - |
| LINEARBURN | - |
| LINEARDODGE | - |
| LINEARLIGHT | - |
| LUMINOSITY | - |
| MULTIPLY | - |
| NORMAL | - |
| OVERLAY | - |
| PASSTHROUGH | - |
| PINLIGHT | - |
| SATURATION | - |
| SCREEN | - |
| SOFTLIGHT | - |
| SUBTRACT | - |
| VIVIDLIGHT | - |
ChangeMode#
The new color profile or mode for a document, specified in Document.changeMode
NOTE: Color images must be changed to GRAYSCALE mode before you can change them to BITMAP mode.
| Name | Description |
|---|---|
| BITMAP | - |
| CMYK | - |
| GRAYSCALE | - |
| INDEXEDCOLOR | - |
| LAB | - |
| MULTICHANNEL | - |
| RGB | - |
ChannelType#
The type of a color channel.
| Name | Description |
|---|---|
| COMPONENT | Specific to document color mode |
| MASKEDAREA | Alpha channel where color indicates masked area |
| SELECTEDAREA | Alpha channel where color indicates selected area |
| SPOTCOLOR | Alpha channel to store a spot color |
ColorBlendMode#
The way color should be blended in a fill or stroke operation. Pass to PathItem.fillPath()
| Name | Description |
|---|---|
| BEHIND | - |
| CLEAR | - |
| COLOR | - |
| COLORBURN | - |
| COLORDODGE | - |
| DARKEN | - |
| DARKERCOLOR | - |
| DIFFERENCE | - |
| DISSOLVE | - |
| EXCLUSION | - |
| HARDLIGHT | - |
| HARDMIXBLEND | - |
| HUE | - |
| LIGHTEN | - |
| LIGHTERCOLOR | - |
| LINEARBURN | - |
| LINEARDODGE | - |
| LINEARLIGHT | - |
| LUMINOSITY | - |
| MULTIPLY | - |
| NORMAL | - |
| OVERLAY | - |
| PINLIGHT | - |
| SATURATION | - |
| SCREEN | - |
| SOFTLIGHT | - |
| VIVIDLIGHT | - |
ColorModel#
The color model representing the current color space of a SolidColor object.
| Name | Description |
|---|---|
| CMYK | - |
| GRAYSCALE | - |
| HSB | - |
| LAB | - |
| NONE | - |
| RGB | - |
ColorProfileType#
Type of color profile used to manage a document, used in Document.colorProfileType
| Name | Description |
|---|---|
| CUSTOM | Set for all custom profiles |
| NONE | Set when document is not color managed |
| WORKING | Set when document uses the working color profile |
DialogModes#
| Name | Description |
|---|---|
| ALL | All dialogs will be shown |
| ERROR | Dialogs will be shown only if Photoshop raises an error |
| NONE | All dialogs will be hidden, and bad calls will silently fail |
Direction#
Used in multiple places to represent orientation.
Orientation of a guide in Guide.direction
| Name | Description |
|---|---|
| HORIZONTAL | - |
| VERTICAL | - |
Dither#
The type of dithering
| Name | Description |
|---|---|
| DIFFUSION | - |
| NOISE | - |
| NONE | - |
| PATTERN | - |
DocumentFill#
Fill methods available for the new document background
| Name | Description |
|---|---|
| BACKGROUNDCOLOR | - |
| BLACK | - |
| COLOR | - |
| TRANSPARENT | - |
| WHITE | - |
DocumentMode#
Color mode of an open document. See also Document.mode and Document.changeMode
| Name | Description |
|---|---|
| BITMAP | - |
| CMYK | - |
| DUOTONE | - |
| GRAYSCALE | - |
| INDEXEDCOLOR | - |
| LAB | - |
| MULTICHANNEL | - |
| RGB | - |
ElementPlacement#
Placement modes for Layer.move method
| Name | Description |
|---|---|
| PLACEAFTER | Place below a layer, below group if group layer |
| PLACEATBEGINNING | Place at the top |
| PLACEATEND | Place at the bottom, above background if background layer exists |
| PLACEBEFORE | Place above a layer, above group if group layer |
| PLACEINSIDE | Place inside a group layer, throws error if not group layer |
ForcedColors#
The type of colors to be included the color table regardless of their usage
| Name | Description |
|---|---|
| BLACKANDWHITE | Pure black and pure white |
| NONE | None |
| PRIMARIES | Red, green, blue, cyan, magenta, yellow, black, and white. |
| WEB | The 216 web-safe colors |
Intent#
The rendering intent to use when converting from one color space to another with Document.convertProfile
| Name | Description |
|---|---|
| ABSOLUTECOLORIMETRIC | - |
| PERCEPTUAL | - |
| RELATIVECOLORIMETRIC | - |
| SATURATION | - |
JPEGFormatOptions#
The option with which to save a JPEG file.
| Name | Description |
|---|---|
| OPTIMIZEDBASELINE | Optimized color and a slightly reduced file size. |
| PROGRESSIVE | Displays a series of increasing detailed scans as the image downloads. |
| STANDARDBASELINE | Format recognized by most web browsers. |
LabelColors#
Options for layer list label colors
| Name | Description |
|---|---|
| BLUE | - |
| GRAY | - |
| GREEN | - |
| ORANGE | - |
| RED | - |
| VIOLET | - |
| YELLOW | - |
LayerKind#
Kinds of different layers in a document
| Name | Description |
|---|---|
| BLACKANDWHITE | - |
| BRIGHTNESSCONTRAST | - |
| CHANNELMIXER | - |
| COLORBALANCE | - |
| COLORLOOKUP | - |
| CURVES | - |
| EXPOSURE | - |
| GRADIENTFILL | - |
| GRADIENTMAP | - |
| GROUP | - |
| HUESATURATION | - |
| INVERSION | - |
| LAYER3D | - |
| LEVELS | - |
| NORMAL | - |
| PATTERNFILL | - |
| PHOTOFILTER | - |
| POSTERIZE | - |
| SELECTIVECOLOR | - |
| SMARTOBJECT | - |
| SOLIDFILL | - |
| TEXT | - |
| THRESHOLD | - |
| VIBRANCE | - |
| VIDEO | - |
MatteColor#
The color to use to fill anti-aliased edges adjacent to transparent areas of the image. When transparency is turned off for an image, the matte color is applied to transparent areas.
| Name | Description |
|---|---|
| BACKGROUND | - |
| BLACK | - |
| FOREGROUND | - |
| NETSCAPE | - |
| SEMIGRAY | - |
| WHITE | - |
NewDocumentMode#
Color Modes available for new document
| Name | Description |
|---|---|
| BITMAP | - |
| CMYK | - |
| GRAYSCALE | - |
| LAB | - |
| RGB | - |
OperatingSystem#
| Name | Description |
|---|---|
| OS2 | - |
| WINDOWS | - |
PNGMethod#
Compression method for saving a PNG file
| Name | Description |
|---|---|
| MODERATE | - |
| QUICK | - |
| THOROUGH | - |
Palette#
The palette type to use
| Name | Description |
|---|---|
| EXACT | - |
| LOCALADAPTIVE | - |
| LOCALPERCEPTUAL | - |
| LOCALSELECTIVE | - |
| MACOSPALETTE | - |
| MASTERADAPTIVE | - |
| MASTERPERCEPTUAL | - |
| MASTERSELECTIVE | - |
| PREVIOUSPALETTE | - |
| UNIFORM | - |
| WEBPALETTE | - |
| WINDOWSPALETTE | - |
PathKind#
The type of a PathItem
| Name | Description |
|---|---|
| CLIPPINGPATH | - |
| NORMALPATH | - |
| TEXTMASK | - |
| VECTORMASK | - |
| WORKPATH | - |
PointKind#
The role a PathPoint plays in a PathItem
| Name | Description |
|---|---|
| CORNERPOINT | - |
| SMOOTHPOINT | - |
RasterizeType#
The type of layer to get rasterized.
| Name | Description |
|---|---|
| ENTIRELAYER | - |
| FILLCONTENT | - |
| LAYERCLIPPINGPATH | - |
| LAYERSTYLE | - |
| LINKEDLAYERS | - |
| PLACED | - |
| SHAPE | - |
| TEXTCONTENTS | - |
| VECTORMASK | - |
| VIDEO | - |
ResampleMethod#
The method to use for image interpolation
| Name | Description |
|---|---|
| AUTOMATIC | Choose best option automatically |
| BICUBIC | Bicubic interpolation |
| BICUBICSHARPER | Apply a sharpening mask |
| BICUBICSMOOTHER | Apply a smoothing mask |
| BILINEAR | Bilinear interpolate |
| DEEPUPSCALE | Using deep learning, predict what the picture will look like larger |
| NEARESTNEIGHBOR | Determine value based on nearest neighbor |
| NONE | Duplicates pixels |
| PRESERVEDETAILS | Attempt to preserve details by using machine learning |
SaveMethod#
| Name | Description |
|---|---|
| SAVE | Saves the current document at the current format |
| SAVEAS | Changes the format of document, changing the file |
| SAVEASCOPY | Creates a copy of the document in the new format |
SaveOptions#
The policy for closing a document
| Name | Description |
|---|---|
| DONOTSAVECHANGES | Will close document without saving, discarding changes |
| PROMPTTOSAVECHANGES | Will ask the user if they'd like to save changes, blocking the script |
| SAVECHANGES | Will save all existing changes before closing, prompting if document is not saved yet |
SelectionType#
The selection behavior when a selection already exists. Used in PathItem.makeSelection()
| Name | Description |
|---|---|
| DIMINISH | Remove the selection from the already selected area |
| EXTEND | Add the selection to an already selected area |
| INTERSECT | Make the selection only the area where the new selection intersectes the already selected area |
| REPLACE | Replace the selected area |
ShapeOperation#
How to combine the shapes if the destination path already has a selection.
Set for SubPathInfo.operation, stored in the resulting SubPathItem
| Name | Description |
|---|---|
| SHAPEADD | - |
| SHAPEINTERSECT | - |
| SHAPESUBTRACT | - |
| SHAPEXOR | - |
ToolType#
The tool to use with PathItem.strokePath()
| Name | Description |
|---|---|
| ARTHISTORYBRUSH | - |
| BACKGROUNDERASER | - |
| BLUR | - |
| BRUSH | - |
| BURN | - |
| CLONESTAMP | - |
| COLORREPLACEMENTTOOL | - |
| DODGE | - |
| ERASER | - |
| HEALINGBRUSH | - |
| HISTORYBRUSH | - |
| PATTERNSTAMP | - |
| PENCIL | - |
| SHARPEN | - |
| SMUDGE | - |
| SPONGE | - |
TrimType#
Type of pixels to trim around an image, passed to Document.trim.
| Name | Description |
|---|---|
| BOTTOMRIGHT | Bottom right pixel color. |
| TOPLEFT | Top left pixel color. |
| TRANSPARENT | Transparent pixels. |
Units#
Valid Units for convertUnits method, used in Photoshop.convertUnits
| Name | Description |
|---|---|
| CM | - |
| INCHES | - |
| MM | - |
| PICAS | - |
| PIXELS | - |
| POINTS | - |

