Slide kit command
image.adjust
Corrections
Sets picture brightness, contrast, saturation, grayscale, transparency or recolor. Applies to the shapes in `ids` (on slide `onSlide`, from 1) or else the selection.
- Kit
- Slide 0.1.0 (.kslide and .pptx)
- Changes the document
- yes
- Acts on
ids(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
brightness | integer (≥ -1, ≤ 1) | no | -1 to 1 |
contrast | integer (≥ -1, ≤ 1) | no | -1 to 1 |
grayscale | boolean | no | |
ids | (integer | string)[] | no | |
onSlide | integer | no | the slide the ids are on, from 1 |
reset | boolean | no | |
saturation | integer (≥ 0, ≤ 4) | no | 0 to 4 |
transparency | number (≥ 0, ≤ 1) | no | 0 to 1 |
Call through slide_run
text
slide_run {
"path": "<file>.pptx",
"steps": [{ "command": "image.adjust" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: brightness, contrast, grayscale, ids, onSlide, reset, saturation, transparency. slide_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": {
"brightness": {
"description": "-1 to 1",
"maximum": 1,
"minimum": -1,
"type": "integer"
},
"contrast": {
"description": "-1 to 1",
"maximum": 1,
"minimum": -1,
"type": "integer"
},
"grayscale": {
"type": "boolean"
},
"ids": {
"items": {
"description": "an id",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array",
"x-khp-types": [
"Shape"
]
},
"onSlide": {
"description": "the slide the ids are on, from 1",
"type": "integer"
},
"reset": {
"type": "boolean"
},
"saturation": {
"description": "0 to 4",
"maximum": 4,
"minimum": 0,
"type": "integer"
},
"transparency": {
"description": "0 to 1",
"maximum": 1,
"minimum": 0,
"type": "number"
}
},
"type": "object",
"x-khp-position": "independent"
}Generated from the command list of @kition/[email protected] and the kit itself (slide_commands through @kition/[email protected], built from KitionAI/kition-slide@7ef3d11). As data: commands.jsonl.