Photo kit command
file.presets.save
Save Document Preset
Saves new-document `settings` (size, resolution, mode, background) as preset `name`.
- Kit
- Photo 0.1.0 (PSD, PSB, or .kphoto)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
coalesce | string | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
name | string | no | trimmed, ASCII case-insensitive unique, 1..255 characters |
settings | object | no | {"width":px,"height":px,"resolution":ppi=72,"mode":"rgb|gray|cmyk|lab"="rgb","depth":8|16|32=8,"background":"white|black|transparent|backgroundColor|#rrggbb"="white","backgroundColor":[r,g,b]?,"unit":"px|in|cm|mm|pt|pica"="px","resolutionUnit":"in|cm"="in"} |
Call through photo_run
text
photo_run {
"path": "<file>.psd",
"steps": [{ "command": "file.presets.save" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: coalesce, name, settings. photo_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"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"
},
"name": {
"description": "trimmed, ASCII case-insensitive unique, 1..255 characters",
"type": "string"
},
"settings": {
"additionalProperties": true,
"description": "{\"width\":px,\"height\":px,\"resolution\":ppi=72,\"mode\":\"rgb|gray|cmyk|lab\"=\"rgb\",\"depth\":8|16|32=8,\"background\":\"white|black|transparent|backgroundColor|#rrggbb\"=\"white\",\"backgroundColor\":[r,g,b]?,\"unit\":\"px|in|cm|mm|pt|pica\"=\"px\",\"resolutionUnit\":\"in|cm\"=\"in\"}",
"properties": {
"background": {
"default": "white",
"enum": [
"white",
"black",
"transparent",
"backgroundColor",
"#rrggbb"
],
"type": "string"
},
"backgroundColor": {
"description": "[r, g, b]",
"items": {
"type": "number"
},
"type": "array"
},
"depth": {
"default": 8,
"enum": [
8,
16,
32
],
"type": "integer"
},
"height": {
"description": "pixels",
"type": "number"
},
"mode": {
"default": "rgb",
"enum": [
"rgb",
"gray",
"cmyk",
"lab"
],
"type": "string"
},
"resolution": {
"description": "ppi=72; default 72"
},
"resolutionUnit": {
"default": "in",
"enum": [
"in",
"cm"
],
"type": "string"
},
"unit": {
"default": "px",
"enum": [
"px",
"in",
"cm",
"mm",
"pt",
"pica"
],
"type": "string"
},
"width": {
"description": "pixels",
"type": "number"
}
},
"type": "object"
}
},
"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.