Modify Selection
photopea_modify_selectionAdjust image selection boundaries by expanding, contracting, or feathering edges by pixel amount, or invert selected areas to modify editing coverage.
Instructions
Modify the current active selection. Requires an existing selection created by make_selection. For expand, contract, and feather, the amount parameter specifies pixels. Invert swaps selected and unselected areas.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | How to modify the selection: 'expand' grows it, 'contract' shrinks it, 'feather' softens edges, 'invert' swaps selected/unselected | |
| amount | No | Modification amount in pixels (required for expand, contract, feather; ignored for invert) |