Edit in GitHubLog an issue

Photoshop API Changelog

Photoshop 26.0 (October 2024)

UXP v8.0.1

Breaking Changes

  • enableFillAsCustomAttribute feature flag, introduced in UXPv7.1.0, will be turned on by default.

Deprecations

New

  • New components supported in Spectrum Web Components (SWC). More details here

    • sp-asset
    • sp-meter
    • sp-number-field
    • sp-overlay
    • sp-quick-actions
    • sp-search
    • sp-swatch
  • New command line templates to get started with SWC easily. Find details in this section.

  • Support for local HTML files in WebView

  • New CSS capabilities

    • scaleX() & scaleY()
    • transform-origin
    • translate property
    • Box-shadow property now supports transform rotate.
  • New feature flag CSSNextSupport in the manifest.json to gate the new and future CSS capability.

    Manifest settingDescription
    featureFlags: {"CSSNextSupport": true}
    Enables all the new CSS features.
    featureFlags: {"CSSNextSupport": ["boxShadow", "transformFunctions", "transformProperties" ]}
    Enables only the named properties in the list.

    Note that "enableSWCSupport": true will enable CSSNextSupport by default, even if it is not done explicitly in plugin manifest otherwise.

  • Video enhancements: Support added for Seek Event

  • Support for Navigator.language API

  • Support for new HTMLElement APIs - append, prepend and replaceChildren

  • [Beta] Support for form reset in HTMLFormElement

Updated

Photoshop Beta 25.10 (May 2024)

timeOut option added to executeAsModal. Also, the error message returned on a modal request collision was updated to include the id of the plugin that initiated the existing modal state.

Photoshop Beta 25.5 (February 2024)

UXP v7.4 Integration

Updated

  • UXP Alerts (alert, prompt, confirm) have been moved back to beta due to a few inherent instabilities in this feature. While we work on addressing these issues, the feature can be accessed using the feature flag enableAlerts in the manifest.json file. Also, note that UXP alerts will be available only in Plugins and not in scripts.
  • Wildcards (*) at the top-level domain name are not allowed. Please ensure you revisit the permissions setup in manifest.json for WebView, and network calls (XMLHttp, fetch)
  • New doc for tracking the mapping between Spectrum widgets and Spectrum Web Components in UXP

Fixed

  • XMP now works in UXP Scripts.
  • Plugin crashes while using fit-content
  • WebView support for file selector in MacOS
  • GUID returning hashed empty string
  • Updated missing docs for pseudo-class defined (Available since UXP v6.0)

Photoshop Beta 25.2 (October 2023)

UXP v7.3 Integration

New

  • GUID for uniquely identifying a Creative Cloud User.
  • Multipart FormData support in Request and Response for fetch
  • FormData now supports the following APIs
    • delete()
    • get()
    • getAll()
    • has()
    • keys()
    • set()
    • values()

Updated

  • FormData's append now supports Blob as an additional parameter.
  • Spectrum Web Components support in React context is now available for all 30 components.
    • Sample plugin for UXP-SWC plugin in React context can be referred here

Fixed

  • Tab Navigation not working for several SWC Components is now fixed
  • Spacebar doesn't work on SWC Button component when reached via TAB navigation.

UDT v2.0

New

  • UXP Playground to experiment with APIs. Click on the 'Playground' tab next to 'Developer Workspace' to select an app and get started.

Updated

  • Plugin actions are surfaced based on the 'Status' of your plugin in the Developer Workspace

Photoshop 25.1 (October 2023)

Document objects can report the current zoom value.

UXP Plugin Action Record Again

The ability to re-record an Action step via the Actions panel flyout menu item, "Record Again", or by double-clicking the step now works. To support that ability, see the notes at Action Recording.


Photoshop 25.0 (September 2023)

Action Recording

Adds the capability for UXP plugins to record and playback Action steps. See Advanced > Action Recording for usage details.

batchPlay option: suppressProgressBar

This value can be used to suppress a Photoshop progress bar while the command is being executed.

Selection

In Document.selection you can now find the new Selection class for handling pixel selection. Properties: typename, docId, parent, bounds, solid.

And methods: contract, deselect, expand, feather, grow, inverse, load, makeWorkPath, selectAll, selectRectangle, selectEllipse, selectPolygon, selectRow, selectColumn, save, saveTo, selectBorder, smooth, translateBoundary, resizeBoundary, rotateBoundary. (All methods here return Promise<void>.)

Bug Fixes

  • Fixes error when Channels.getByName did not work for inactive document

Photoshop C++ SDK Access from UXP Hybrid Plugins

UXP hybrid plugins can now access the suites of functionality made available via the Photoshop C++ SDK.

UXP v7.2 Integration

New

Updated


Photoshop 24.6 (June 2023)

24.6 Bug Fixes

  • Component channels should work now correctly in non-English localizations. This applies to:
    • document.componentChannels
    • document.compositeChannels (deprecated)
    • document.activeChannels
    • channels.getByName()
    • other methods inherited from an Array in Channels Class
  • Channel should be now returned correctly in Bitmap and Indexed Color modes.
  • Component channel name will now throw an error if channel no longer exist in document.
  • Component channel name is no longer converted into lowercase and is same as in UI.
  • TypeScript: channels.parent now points to the correct Document type.
  • Deprecated document.compositeChannels since these channels are component not composite. Use componentChannels instead.

Photoshop 24.5 (May 2023)

Calculations and Apply Image

The blending operations Layer Apply Image and Document Calculations are now available.

Both methods accept an options object that matches the parameters required in the respective UI dialog.

Other updates

  • Replaced compositeChannels property on Document with more appropriately named componentChannels.
  • Channels returned will be of type ComponentChannel instead of CompositeChannel with corresponding typename.

UXP v7.1 Integration

New

HTMLElement now supports

Updated

Fixed

  • SVGElement: The color of the fill attribute using a CSS variable will resolve as per the variable value. For now, please test this fix by enabling the feature flag in your plugin manifest "featureFlags" : { "enableFillAsCustomAttribute" : true }. This flag will be turned on by default in the next UXP release.
Copied to your clipboard
// CSS variable
html {
--iconColor: yellow;
}

Photoshop 24.4 (April 2023)

Imaging API update

The Imaging API is moving out of Prerelease. It will now be available in the Beta build with the module name "imaging". Previously, access was via require("photoshop").imaging_beta. It is now require("photoshop").imaging.

Improvements and Fixes

  • Speed on Windows, especially medium to small images.
  • Invalid targetBounds caused crash.

UXP v7.0 Integration

New

Changed

  • HTMLVideoElement: 'metadata' is the default value for preload attribute
  • FS API: No need for the file:// protocol

Photoshop 24.2 (February 2023)

Imaging API Beta

We are excited to provide an entirely new capability with the Imaging API. Anyone that has been eagerly awaiting the ability to directly get and set pixels in a document should head to the dedicated page. Note: we are serious about the Beta label. While this is exciting new territory, keep in mind that the API is in an early form. We want your feedback to help guide it toward maturity.

Text support

The UXP DOM features a variety of new text-related APIs, that provide a more robust and consistent experience for developers. Instead of aiming for ExtendScript parity, the UXP DOM has been designed to provide a more modern and intuitive API surface. While still providing the old functionality, it's been extended to cover many features that weren't previously available.

  • A Document.createTextLayer method was added, which allows developers to create a new text layer in a document. It accepts a TextLayerCreateOptions object, which can be used to set the initial text content, style, and other properties.
  • The textItem property of a Text Layer is the entrypoint for everything text-related. It provides direct access to a few properties and methods:
    • contents
    • isParagraphText
    • isPointText
    • orientation
    • textClickPoint
    • convertToParagraphText()
    • convertToPointText()
    • convertToShape()
    • createWorkPath()
  • Properties and methods related to features made available by Photoshop in the Character palette are now grouped in the textItem.characterStyle object:
    • alternateLigatures
    • antiAliasMethod
    • autoKerning
    • baseline
    • baselineShift
    • capitalization
    • characterAlignment
    • color
    • fauxBold
    • fauxItalic
    • font
    • fractionalWidths
    • fractions
    • horizontalScale
    • kashidas
    • horizontalDiacriticPosition
    • verticalDiacriticPosition
    • language
    • leading
    • ligatures
    • middleEasternDigitsType
    • middleEasternTextDirection
    • noBreak
    • ordinals
    • size
    • strikeThrough
    • stylisticAlternates
    • swash
    • titlingAlternates
    • tracking
    • useAutoLeading
    • verticalScale
    • reset()
  • Properties and methods related to features made available by Photoshop in the Paragraph palette are now grouped in the textItem.paragraphStyle object:
    • firstLineIndent
    • hyphenation
    • hyphenationFeatures
    • justification
    • justificationFeatures
    • layoutMode
    • kashidaWidth
    • kinsoku
    • mojikumi
    • leftIndent
    • rightIndent
    • spaceAfter
    • spaceBefore
    • reset()
  • Properties and methods related to features made available by Photoshop in the Warp text dialog are now grouped in the textItem.warpStyle object:
    • style
    • direction
    • bend
    • horizontalDistortion
    • verticalDistortion
    • reset()

Other fixes

  • solidColor.cmyk no longer shows undefined for yellow color. Also setter is now fixed.
  • SolidColor - Adds range validation for all color modes and its components so it should not be possible to enter invalid value. This should also fix invalid hex code value.
  • Adds setter to the app.backgroundColor so it can be changed.
  • app.backgroundColor and app.foregroundColor were broken when color was was not picked as RGB color*
  • RGB32 is currently not supported. If RGB 32 bit per channel is obtained, it will be converted automatically into nearest RGB 16 bit per channel.

UXP v6.5 Integration

New


Photoshop 24.1 (December 2022)

app.getColorProfiles

Color profiles are needed for the Imaging API, so a new method on the app is introduced to return profile names. At this time, only profiles for RGB and Gray are available.

CountItems support

The CountItems DOM API is now available in Photoshop.

  • The CountItems collection behaves like other collections at the Document level in the API. CountItems further support the following properties and methods:
    • typename, length, parent.
    • add(), removeAll(), getAll(), createGroup(), renameActiveGroup(), removeGroupByIndex(), toggleActiveGroupVisibility(), activateGroupByIndex(), setActiveMarkerSize(), setActiveLabelSize(), setActiveColor().

Other fixes

We now throw errors in more situations with layer blend modes

  • Passing a value that is not in Constants.blendMode.

  • Passing a blend mode that is not compatible with the document's color mode or bit depth. Previously, this call would fail silently.

  • Attempting to set the blend mode on the Background layer. Previously, doing so would convert Background to a regular layer and generate a new layer ID. Automatic Background promotion is undesirable as a side effect in this case. This action is not available via the UI.

  • The CountItem class implements the following properties and methods:

    • typename, parent, itemIndex, groupIndex, position
    • move(), remove()

UXP v6.4 Integration

New

Bugs Fixes

  • PluginManifest parsing / Load Plugin errors not logged in UDT
  • Error shown in UDT APP logs on Plugin UnLoad
  • UXP script : file session tokens are not getting created
  • Error message and stack are empty in case of reject("error string") executed in script
  • [Win only]-Volume is being muted automatically for 3rd video in the tutorial while opening the video in Theatre mode
  • After closing the theatre mode, videos are overlapping while scrolling up and down in DP
  • Provide an API to programmatically close dialog in pop-out/theatre mode.
  • Plugin Data folder shouldn't be created for scripts
  • Crash on exit
  • script.setResult("kSuccess") not working
  • Resource Leaks in Window Dialog on UWP
  • Privilege plugin fail to add in XD in certain cases
  • Fixed mouse/keyboard events within Webview in XD v55 and Win 10.

Photoshop 24.0 (October 2022)

Preferences

Adds API to change some of the Photoshop preferences. Only first set of 38 preferences was added. More will follow.

ColorSamplers support

The ColorSampler DOM API is now available in Photoshop.

  • The ColorSamplers collection behaves like other collections at the Document level in the API. ColorSamplers further supports the following methods:
    • colorSamplers.add()
    • colorSamplers.removeAll()
  • The ColorSamplers class implements the following properties and methods:
    • typename: String
    • parent: Document
    • position: {x: number, y: number}
    • color: SolidColor
    • move({x: number, y: number})
    • remove()
  • The Document class implements a new sampleColor() method that samples an {x, y} position on the fly, returning a SolidColor object without the need to create a ColorSampler object.

Layer Comps support

  • Document.layerComps property is now added, giving access to similar APIs from ExtendScript to work with layer comps.
  • LayerComps collection
    • Adds the following Layer Comp methods: add(), removeAll(), getByName()
    • Create new layer comps in the document using LayerComps.add() method. Constructors for them can be found in app object.
  • LayerComp class
    • Adds the following Layer Comp properties: name, comment, selected, appearance, position, visibility, childComp.
    • Adds the following Layer Comp methods: apply(), recapture(), remove(), resetLayerComp(), duplicate()

Guide fixes

  • Guide.coordinate Fixes coordinate getter when document resolution is not 72 PPI
  • Guide.coordinate Fixes coordinate setter when document resolution is not 72 PPI
  • Guides.add Fixes coordinate when creating a new guide if document resolution is not 72 PPI
  • Guides.add Creating a new guide had returned an invalid, nonexistent instance. It now points to an existing guide.

Known Issues and Workarounds

  • A new page of Known Issues and Workarounds was introduced, and aims to outline some common issues encountered by our developer community. New entries will be summarized in this changelog.
  • A note about increased error throws from batchPlay, specifically with the move command, was added.

Layer Filter Methods

Other

  • Color mode validation for all filters
  • Fixed Lens Flare coordinates
  • Fixed file arguments for filters

Photoshop 23.5 (August 2022)

UXP Scripting

Script files with extension .psjs are executed using UXP.

Layer Filter methods


Photoshop 23.4 (July 2022)

convertUnits method on the Photoshop Application object

  • Application.convertUnits is a method for converting the pixel values found in the UXP API to other units. For example, use this routine for converting a document's width from pixels to inches.

Photoshop 23.3 (April 2022)

Paths support

  • Document.pathItems property is now added, giving access to same APIs from ExtendScript to work with paths.
  • Document.pathItems provides the collection class PathItems, which is a collection of PathItem objects.
  • PathItem.subPathItems provides the collection class SubPathItems, which is a collection of SubPathItem objects.
  • SubPathItem.pathPoints provides the collection class PathPoints, which is a collection of PathPoint objects.
  • Create new paths in the document using PathItems.add method by providing PathPointInfo and SubPathInfo objects. Constructors for them can be found in app object.

Load on Launch support

You can now set your plugin manifest to load your plugin on app launch. See Photoshop Manifest for details.

batchPlay development helper: Copy as Javascript

It is now possible to use the Photoshop Actions panel to help build your plugin. Record valid actions, and let Photoshop generate readable and valid batchPlay to use in your UXP plugin. See the batchPlay documentation under "Accepted action descriptors".

Core event: "userIdle"

This event is generated when Photoshop detects that a user becomes idle, while Photoshop is the foreground application. A plugin must specify a number of idle seconds, and then may choose to batch process-intensive tasks. See photoshopCore.

Interactive Mode for executeAsModal

As an alternative to a UI-blocking progress bar when a plugin is within a Modal Execution scope, interactiveMode can be requested to allow for user interaction in specific circumstances. See Interactive Mode.


Photoshop 23.2 (February 2022)

  • Core Module: setExecutionMode()
  • Core Module: getPluginInfo()

Photoshop 23.1 (December 2022)

  • Core Module: batchPlaySync()
  • Core Module: validateReference()
  • Core Module: isModal()
  • Core Module: getCPUInfo()
  • Core Module: getGPUInfo()

Photoshop 23.0 (October 2021)

Channel support

  • Channels collections behave like other collections in the API. Channels further supports channels.add() and channels.removeAll().
  • Channel class
    • Supports four types of channels, as listed in Constants.ChannelType: COMPONENT, MASKEDAREA, SELECTEDAREA, SPOTCOLOR.
    • Adds the following Channel properties: name, type, visible, histogram, color, opacity.
    • Adds the following Channel methods: remove(), merge() (for ChannelType.SPOTCOLOR).
    • Adds to the Document class: get compositeChannels, get activeChannels, set activeChannels.

Document Transformations

  • Document.crop(bounds: Bounds, angle, width, height): Crops the document. The bounds paramter is an array of four coordinates for the region remaining after cropping, [left, top, right, bottom].
  • Document.resizeCanvas(width, height, Constants.AnchorPosition): Changes the size of the canvas to display more or less of the image but does not change the image size. See resizeImage
  • Document.resizeImage(width, heigh, resolution, Constants.ResampleMethod, amount): Changes the size of the image. The amount of noise value when using preserve details (Range: 0 1 100).
  • Document.rotateCanvas(angle): Rotates the image and resizes the canvas to fit the resized image.
  • Document.trim(Constants.TrimType, top, left, bottom, right): If TrimType.TRANSPARENT, trims the transparent area around the image on the specified sides of the canvas. Trims surround areas that color match the top left corner or bottom right corner pixel if TrimType.TOPLEFT or TrimType.BOTTOMRIGHT is specified, respectively.

Layer cut and copy

  • layer.cut(): Cut the pixels out of the layer.
  • layer.copy(merge: boolean): Copy the layer or if a selection is present the merge option will copy from multiple layers..

Layer Methods

  • layer.duplicate(relativeObject?: Document | Layer, insertionLocation?: Constants.ElementPlacement, name?: string): Duplicates the layer, creating a copy above it in layer stack and returns the newly created layer.
  • layer.delete(): Deletes this layer from the document.
  • layer.link(): Creates a link between this layer and the target layer if not already linked and returns a list of layers linked to this layer.
  • layer.unlink(): Unlinks the layer from any existing links.

Document paste

  • document.paste(intoSelection: boolean): Pastes the contents of the clipboard into the document. If the optional argument is set to true and a selection is active, the contents are pasted into the selection.

Document Methods

  • Document.flatten(): Merges all visible layers in the document into a single layer.
  • Document.mergeVisibleLayers(): Flattens all visible layers in the document
  • Document.revealAll(): Expands the document to show clipped sections.
  • Document.rasterizeAllLayers(): Rasterizes all layers.
  • Document.splitChannels(): Splits the document channels into separate, single-channel documents.
  • Document.duplicate(): Creates a copy of the document, switching to the copy.

SolidColor API

  • Add require('photoshop').app.SolidColor constructor, which allows for creation of SolidColor objects.
  • APIs that accept colors now also accept SolidColor objects.
    • app.foregroundColor and app.backgroundColor.
    • app.documents.add fillColor property.
    • Document.saveAs methods that use colors.
  • require('photoshop').core.convertColor low level API added, used internally by SolidColor. It uses app color settings to convert between color spaces.

Adobe Photoshop Beta Build 65: Sep 3, 2021 (23.0)

Layer Transformations

  • layer.rotate(angle: number, anchor?: Constants.AnchorPosition): Rotate by angle about anchor.
  • layer.scale(width: number, height: number, anchor?: Constants.AnchorPosition): Scale layer by width percent and height percent of the image, relative to anchor.
  • layer.translate(horizontal: number, vertical: number): Translate layer by horizontal and vertical offset (by pixel or percent).

app.fonts and TextFont classes

  • app.fonts getter: Returns all installed fonts
  • TextFont class and TextFonts collection class

Document Properties

  • Document.bitsPerChannel (read-write): The bits per color channel (type Constants.BitsPerChannelType)
  • Document.cloudDocument (read only): This document is in the Adobe Creative Cloud (type boolean)
  • Document.cloudWorkAreaDirectory (read only): Local directory for this cloud document (type string)
  • Document.histogram (read only): A histogram containing the number of pixels at each color intensity level for the composite channel. The array contains 256 members.
  • Document.name (read only): The name of the document (type string)
  • Document.path (read only): Full file system path to this document, or the identifier if it is a cloud document (type string)
  • Document.quickMaskMode (read-write): The state of Quick Mask mode. If true, the app is in Quick Mask mode (type boolean)
  • Document.saved (read only): True if the document has been saved since the last change (type boolean)

Document Color Profile APIs

  • Document.mode property (read only)
  • Document.colorProfileType and Document.colorProfileName properties (read-write)
  • Document.changeMode(), Document.convertProfile(), and Document.trap() methods

Adobe Photoshop Beta Build 64: Aug 6, 2021 (23.0)

Document.suspendHistory

This API wraps around core.executeAsModal within a single document to make it easier for you to run your code under a single history state. Unlike it's ExtendScript predecessor, this method takes a Javascript function, rather than a script string.

Layer Move APIs

  • Arrange layers with layer.move(targetLayer, Constants.ElementPlacement). Added Constants.ElementPlacement for moving layers: "placeAfter" (place below a layer, below group if group layer), "placeBefore" (place above a layer, above group if group layer), and "placeInside" (inside group layers only).
  • Send a layer to the back or bring a layer to the front with layer.sendToBack() and layer.bringToFront(). If layer is within a group, the commands will operate within that group.

Adobe Photoshop Prerelease Build 61: Jun 24, 2021 (22.5)

Updated DOM API

  • New Layers collection, the old layerTree object is now called layers but as a collection using the JavaScript Proxy object. See below for introduction of collections. The old layers behavior is no longer part of the DOM. Most scripts can be updated to replace layerTree with layers. A document and a layer, if the layer kind is group, will have a valid layers collection. A pixel layer will have null for the layers property. A collection has the same semantics as an Array. The additional ExtendScript routines of add and getByName are also available. Use LayerKind.GROUP on a layer to see if any layers are available.
  • GroupLayer has been removed. Use activeLayer.kind === LayerKind.GROUP instead.
  • Constants.LayerKind, similar to ExtendScript version, but with "group" layer addition.
  • Layer APIs
    • new locked, read-only way to tell if any of the properties are locked
    • allLocked, pixelsLocked, positionLocked, transparentPixelsLocked properties
    • Some existing properties exposed in documentation

Adobe Photoshop Prerelease Build 60: Jun 10, 2021 (22.5)

This update contains changes that were made since the MAX 2020 (Adobe Photoshop 22.0) release.

Breaking changes

To use the new set of APIs, your project's manifest.json must be updated to include the following under the host object:

Copied to your clipboard
"data" : {
"apiVersion": 2
}

Further, your manifest.json must use version 4:

Copied to your clipboard
"manifestVersion": 4

To roll back to the MAX 2020 version of the Photoshop DOM API, set the apiVersion to 1.

Updated DOM API

  • Collections
    • We're introducing collection classes built using Proxies, to make it easier to interact with the DOM.
    • Try iterating through all the documents as such: app.documents.forEach(h => console.log(h.title));
  • HistoryStates collections and HistoryState API
    • We've built HistoryStates to mirror ExtendScript functionality. length, parent, and getByName(name) are provided. You can also use indices as such: activeDocument.historyStates[2].
    • HistoryState provides name, parent, snapshot.
  • Documents collections
    • Documents also follows ExtendScript functionality. length, add, getByName(name), parent are provided.
  • Constants module, collecting all enumerations and constants used in DOM API. Accessible via require("photoshop").constants.
  • Updated app.createDocument / app.add
    • Create a document with no params for a default document, with a predefined preset, or by providing a host of DocumentCreateOptions).
  • Updated document.save and document.saveAs
    • save no longer infers the file type from the requested file name. Instead, it invokes a save dialog for unsaved files, and performs a save operation for saved, modified files.
    • saveAs is provided for bmp, gif, jpg, png, psb, psd formats. Use SaveOptions objects to request specific saves (e.g. PhotoshopSaveOptions).
  • layer.id getter
  • Updated document.createLayer and document.createLayerGroup
    • With respective Create options: LayerCreateOptions and GroupLayerCreateOptions.
    • Collection access updates for Layer and Layer-like items are planned for upcoming releases.

Photoshop Core updates

  • Execute as Modal allows you to create plugins that can be guaranteed exclusive control over Photoshop during execution. It further allows for clear user feedback when this is occuring, and allows plugins to suspendHistory and resumeHistory.
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.