Photo kit command
select.edgeRefine
Edge Refine
Refines the selection edge (`radius` or `smartRadius`, `smooth`, `feather`, `contrast`, `shiftEdge`) and outputs it as a selection, layer mask or new layer; `decontaminate` removes color fringes.
- Kit
- Photo 0.1.0 (PSD, PSB, or .kphoto)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
amount | integer | no | 0 to 100 |
coalesce | string | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
contrast | integer | no | 0 to 100 |
decontaminate | boolean | no | |
feather | number | no | pixels |
output | "selection" | "layerMask" | "newLayer" | "newLayerWithMask" | no | |
radius | number | no | pixels |
sampleAllLayers | boolean | no | |
shiftEdge | integer | no | -100 to 100 |
smartRadius | boolean | no | |
smooth | integer | no | 0 to 100 |
Call through photo_run
text
photo_run {
"path": "<file>.psd",
"steps": [{ "command": "select.edgeRefine" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: amount, coalesce, contrast, decontaminate, feather, output, radius, sampleAllLayers, shiftEdge, smartRadius, smooth. photo_run answers the step’s result in completed[i].result.
Result
Result JSON Schema
json
{
"additionalProperties": true,
"description": "an object; the command's description says what it holds",
"properties": {},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"amount": {
"default": 100,
"description": "0 to 100",
"type": "integer"
},
"coalesce": {
"description": "Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.",
"type": "string"
},
"contrast": {
"default": 0,
"description": "0 to 100",
"type": "integer"
},
"decontaminate": {
"default": false,
"type": "boolean"
},
"feather": {
"default": 0,
"description": "pixels",
"type": "number"
},
"output": {
"default": "selection",
"enum": [
"selection",
"layerMask",
"newLayer",
"newLayerWithMask"
],
"type": "string"
},
"radius": {
"default": 0,
"description": "pixels",
"type": "number"
},
"sampleAllLayers": {
"default": false,
"type": "boolean"
},
"shiftEdge": {
"default": 0,
"description": "-100 to 100",
"type": "integer"
},
"smartRadius": {
"default": false,
"type": "boolean"
},
"smooth": {
"default": 0,
"description": "0 to 100",
"type": "integer"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (photo_commands through @kition/[email protected], built from KitionAI/kition-photo@abe3f30). As data: commands.jsonl.