Constants
To use any constant, import the constants object from the photoshop module first.
const {app, constants} = require("photoshop");
await app.activeDocument.resizeImage(
800, 600, 100,
constants.InterpolationMethod.AUTOMATIC
);
Enumerations
AnchorPosition
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The point around which to transform an object.
This is the point that does not move when an object is rotated or resized
AntiAlias
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> Method to use to smooth edges by softening the color transition between edge pixels and the background. Used in a CharacterStyle.antiAliasMethod
ApplyImageBlendMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.5</span>
<br/> The kind of blending used in a Layer.applyImage operation.
ApplyImageChannel
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.5</span>
<br/> Special channels used in Layer.applyImage.
ApplyImageLayer
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.5</span>
<br/> Use merged layers as a source in Layer.applyImage.
AutoKernType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The type of kerning to use for characters. Used in CharacterStyle.autoKerning
BMPDepthType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Number of bits per channel (also called pixel depth or color depth).
The number selected indicates the exponent of 2. With 8 bits per channel, we have 256 possible colors.
Baseline
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The baseline style to use in text. Used in CharacterStyle.baseline
BitmapConversionType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Specifies the quality of an image you are converting to bitmap mode. Used in BitmapConversionOptions
BitmapHalfToneType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Specifies the shape of the dots (ink deposits) in the halftone screen. Used in BitmapConversionOptions
BitsPerChannelType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.0</span>
<br/> The number of bits per color channel.
BlendMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Blending mode
CalculationsBlendMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.5</span>
<br/> The kind of blending used in a Document.calculations operation.
CalculationsChannel
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.5</span>
<br/> Special channels used in Document.calculations.
CalculationsLayer
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.5</span>
<br/> Use merged layers as a source in [Document.calculations]].
CalculationsResult
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.5</span>
<br/> The result of Document.calculations can go into a new document, a new channel in the active document, or a new selection in the active document.
ChangeMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> 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.
ChannelType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The type of a color channel.
CharacterAlignment
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The character alignment to use in text. Used in CharacterStyle.characterAlignment
ColorBlendMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.3</span>
<br/> The kind of blending used in a fill or stroke operation. Pass to PathItem.fillPath()
ColorModel
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The color model representing the current color space of a SolidColor object.
ColorPicker
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The provider of the color picker dialog. Pass to PreferencesGeneral.colorPicker
ColorProfileType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Type of color profile used to manage a document, used in Document.colorProfileType
CreateFields
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The method used for creating fields. Pass to Layer.applyDeInterlace.
DepthMapSource
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The source to use for the depth map. Pass to Layer.applyLensBlur().
DialogModes
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Controls the type of dialogs Photoshop displays during API calls
Direction
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Used in multiple places to represent orientation.
Orientation of a guide in Guide.direction
DisplacementMapType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> Describes how the displacement map fits the image if the image is not the same size as the map. Pass to Layer.applyDisplace.
Dither
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The type of dithering
DocumentFill
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Fill methods available for the new document background
DocumentMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Color mode of an open document. See also Document.mode and Document.changeMode
EditLogItemsType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The history log edit options. Pass to PreferencesHistory.editLogItems
ElementPlacement
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Placement modes for Layer.move method
EliminateFields
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The type of field to eliminate. Pass to Layer.applyDeInterlace.
FlipAxis
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.0</span>
<br/> Axis (or both) to flip a layer on. Pass to Layer.flip().
FontSize
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> Font size in panels and dialogs. Pass to PreferencesInterface.textFontSize
ForcedColors
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The type of colors to be included the color table regardless of their usage
GenerativeUpscaleModel
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">27.2</span>
<br/> The generative upscale model to use for AI-powered upscaling.
Pass to Document.generativeUpscale()
Geometry
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> Geometric options for shapes, such as the iris shape in the Lens Blur filter. Pass to Layer.applyLensBlur().
GridLineStyle
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The line style for nonprinting grids displayed over images. Pass to PreferencesGuidesGridsAndSlices.gridStyle
GridSize
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The size of grid squares. Pass to PreferencesTransparencyAndGamut.gridSize
GuideLineStyle
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The line style for nonprinting guides displayed over images. Pass to PreferencesGuidesGridsAndSlices.guideStyle
Intent
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The rendering intent to use when converting from one color space to another with Document.convertProfile
InterpolationMethod
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The method to use for bitmap interpolation.
Pass to
- PreferencesGeneral.imageInterpolation
- Layer.scale()
- Layer.skew()
- Layer.rotate()
- Selection.resizeBoundary()
- Selection.rotateBoundary()
JPEGFormatOptions
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The option with which to save a JPEG file.
Justification
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The placement of paragraph text within the bounding box. Used in ParagraphStyle.justification
KashidaWidthType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The width of kashida (tatweel) character Used in ParagraphStyle.kashidaWidth
Kinsoku
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> Line breaking rules in Japanese text Used in ParagraphStyle.kinsoku
LabelColors
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Options for layer list label colors
Language
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The language to use for text. Used in CharacterStyle.language
LayerKind
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Kinds of document layers, including adjustment layers. Grain and Clarity are new in Photoshop 27.4.
LensType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The type of Lens to use. Pass to Layer.applyLensFlare().
MatteColor
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> 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.
MaximizeCompatibility
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The permission state for queries. Pass to PreferencesFileHandling.maximizeCompatibility
MiddleEasternDigitsType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> Digit type to use in text (Middle Eastern features). Used in CharacterStyle.middleEasternDigitsType
MiddleEasternTextDirection
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> Text flow direction (Middle Eastern features). Used in CharacterStyle.middleEasternTextDirection
Mojikumi
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> Spacing between punctuation, symbols, numbers, and other character classes in Japanese text Used in ParagraphStyle.mojikumi
NewDocumentMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Color Modes available for new document
NoiseDistribution
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> Distribution model to use when applying an Add Noise filter. Pass to Layer.applyAddNoise.
OffsetUndefinedAreas
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> Method to use to fill the empty space left by offsetting an image or selection. Pass to Layer.applyOffset()
OperatingSystem
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The target operating system in BMPSaveOptions.
Orientation
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> Used in multiple places to represent orientation e.g., TextItem.orientation
OtherCursors
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The style of the cursors for the following tools: Marquee, Lasso, Polygonal Lasso, Magic Wand, Crop, Slice, Patch Eyedropper, Pen, Gradient, Line, Paint Bucket, Magnetic Lasso, Magnetic Pen, Freeform Pen, Measure, and Color Sampler. Pass to PreferencesCursors.otherCursors
PNGMethod
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> Compression method for saving a PNG file
PaintingCursors
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The style of the cursors for the following tools: Eraser, Pencil, Paintbrush, Healing Brush, Rubber Stamp, Pattern Stamp, Smudge, Blur, Sharpen, Dodge, Burn, Sponge. Pass to PreferencesCursors.paintingCursors
Palette
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The palette type to use
ParagraphFeatures
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The paragraph features to use in text. Used in ParagraphStyle.features
ParagraphLayout
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The paragraph layout to use in text. Used in ParagraphStyle.layoutMode
PathKind
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The type of a PathItem
PointKind
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.3</span>
<br/> The role a PathPoint plays in a PathItem
PointType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The point/pica size: either 72 or 72.27 points per inch. Pass to PreferencesUnitsAndRulers.pointSize
PolarConversionType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The kind of polar conversion. Pass to Layer.applyPolarCoordinates().
PreserveShape
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> Favor the promotion of either corners or curves. Pass to Layer.applyMaximum() and Layer.applyMinimum().
RasterizeType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The type of layer to get rasterized.
ResampleMethod
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The method to use for document interpolation
Pass to Document.resizeImage()
RippleSize
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The size of undulations. Pass to Layer.applyRipple().
RulerUnits
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The measurement unit for ruler increments. Pass to PreferencesUnitsAndRulers.rulerUnits
SampleSize
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> Sample size for the EyeDropper tool and ColorSampler instances.
SaveLogItemsType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> Options for logging the history items. Pass to PreferencesHistory.saveLogItems
SaveMethod
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The type of save operation.
SaveOptions
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">22.5</span>
<br/> The policy for handling new changes upon closing a document.
SavePreview
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The application's behavior regarding image previews. Pass to PreferencesFileHandling.imagePreviews
SelectionType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.3</span>
<br/> The selection behavior when a selection already exists. Used in PathItem.makeSelection(), Selection.saveTo() and Selection.load()
ShapeOperation
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.3</span>
<br/> How to combine the shapes if the destination path already has a selection.
Set for SubPathInfo.operation, stored in the resulting SubPathItem
SmartBlurMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The method to use for smart blurring. Pass to Layer.applySmartBlur().
SmartBlurQuality
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The smart blur quality. Pass to Layer.applySmartBlur().
SpherizeMode
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The curve (or stretch shape) to use for the distortion. Pass to Layer.applySpherize().
StrikeThrough
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The text strikethrough style to use in text. Used in CharacterStyle.strikeThrough
TextCase
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The capitalization style to use in text. Used in CharacterStyle.capitalization
TextureType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The type of texture or glass surface image to load for a texturizer or glass filter. Pass to Layer.applyGlassEffect().
ToolType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.3</span>
<br/> The tool to use with PathItem.strokePath()
TrimType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.0</span>
<br/> Type of pixels to trim around an image, passed to Document.trim.
TypeInterfaceFeatures
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> Options for changing user interface of Character and Paragraph panels. This option is not in Preferences dialog but instead it is located in: Main menu > Type > Language Options Pass to PreferencesType.showTextFeatures
TypeUnits
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.0</span>
<br/> The measurement unit for type. Pass to PreferencesUnitsAndRulers.typeUnits
UndefinedAreas
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> How to treat undistorted areas or areas left blank in an image to which a filter in the Distort category has been applied. Pass to Layer.applyDisplace(), Layer.applyShear(), Layer.applyWave()
Underline
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The underline style to use in text. Used in CharacterStyle.underline
Units
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.4</span>
<br/> Valid Units for convertUnits method, used in Photoshop.convertUnits
WarpStyle
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>
<br/> The warp style to use with Text. Used in a WarpStyle.style
WaveType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The type of wave. Pass to Layer.applyWave().
ZigZagType
<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">23.5</span>
<br/> The method of zigzagging. Pass to Layer.applyZigZag().