reframe_exr
Adjust an EXR's aspect ratio to a target ratio by expanding the canvas with black borders or cropping pixels, with anchor control for the fixed edge.
Instructions
Adjust an EXR's aspect ratio by expanding (adding black borders) or cropping.
Expand mode: adds zero-value padding on one axis so the image reaches target_ratio.
Crop mode: removes pixels from one axis so the image reaches target_ratio.
The anchor controls which side stays fixed:
- When width changes (horizontal adjustment): left / center / right
- When height changes (vertical adjustment): top / center / bottom
Every part of a multi-part EXR is reframed the same way, since all parts must share
one displayWindow. Deep parts, subsampled channels, and parts whose dataWindow differs
from the displayWindow (overscan) are not supported. Output file must not be the same file as input.
For tiled images, the result lists parts whose lower-resolution tile levels were discarded.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>",
"output_path": "<output_path>",
"target_ratio": "<target_ratio>"
},
"name": "reframe_exr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'expand' adds black borders to reach target ratio; 'crop' removes pixels from edges | expand |
| anchor | No | Reference point for the operation. Default 'center'. When width changes: 'left', 'center', 'right'. When height changes: 'top', 'center', 'bottom'. | center |
| input_path | Yes | Absolute path to the source EXR file | |
| part_index | No | Removed parameter. Omit it to reframe every part. | |
| output_path | Yes | Absolute path for the output EXR file (must differ from input) | |
| target_ratio | Yes | Target aspect ratio as width/height (e.g. 1.7778 for 16:9, 2.35, 1.85) |