process_image
Apply a custom sequence of image edits in one pass, preventing compression artifacts by re-encoding JPEGs only once.
Instructions
Apply a custom sequence of operations in one pass.
operations is a JSON list, e.g.
[{"op":"crop_square","anchor":"center"},
{"op":"resize","max_edge":2000},
{"op":"adjust","brightness":0.05}]
Available ops: crop, crop_square, crop_aspect, resize, adjust, autocrop, flatten, fit_spec, enhance. Running them as one pipeline re-encodes the JPEG only once, which avoids stacking compression artefacts.
The optional spec arguments are checked against the FINAL result and
reported under spec, so a pipeline that both reshapes and edits an image
can be validated without a second pass over it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backend | No | ||
| quality | No | ||
| max_width | No | ||
| min_width | No | ||
| input_path | Yes | ||
| max_height | No | ||
| min_height | No | ||
| operations | Yes | ||
| orientation | No | any | |
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |