v8.89.6

Retouch plugin

Use the Retouch plugin to place shapes in the image pixel space.

At its core the Retouch plugin is designed to interact with third-party AI services to do pixel manipulation like generative AI, inpainting, clean up defects, and retouching pictures.

The Retouch UI is empty by default because every AI project and integration is different. This example project shows how to customize the UI and integrate with third-party AI services.

The pixel manipulation by the Retouch util is done non destructively by adding shapes to the imageManipulation array, shapes in this array will be rendered in the image pixel space, meaning filters and color adjustments will also be applied to these shapes.

With the Retouch plugin we can use the imageSelection array to create selections in image pixel space and then convert these selections to shapes with background images using the showTextInput, selectionToMask, and createRetouchShape functions.

Property Default value Description
retouchTools
undefined
Markup editor toolbar to show in the decorate view.
retouchToolShapes
undefined
Markup editor tool styles to use.
retouchActiveTool
'sharpie'
Which tool to select in the toolbar.
retouchShapeControls
undefined
Markup editor shape control styles to use.
retouchWillRenderShapePresetToolbar
undefined
Set to a function that receives the node tree for the preset toolbar. Should synchronously return the node tree. See willRenderShapePresetToolbar for details.
retouchWillRenderShapeControls
undefined
Allows to inject custom shape controls or to edit the shape control menu.
retouchWillRenderShapeStyleControls
undefined
Set to a function that receives the shape controls node tree. Should synchronously return the node tree.