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 |
|
Markup editor toolbar to show in the decorate view. |
retouchToolShapes |
|
Markup editor tool styles to use. |
retouchActiveTool |
|
Which tool to select in the toolbar. |
retouchShapeControls |
|
Markup editor shape control styles to use. |
retouchWillRenderShapePresetToolbar |
|
Set to a function that receives the node tree for the preset toolbar. Should synchronously return the node tree. See willRenderShapePresetToolbar for details.
|
retouchWillRenderShapeControls |
|
Allows to inject custom shape controls or to edit the shape control menu. |
retouchWillRenderShapeStyleControls |
|
Set to a function that receives the shape controls node tree. Should synchronously return the node tree. |