Action Image
Scale Image
Resizes an image to new dimensions, with optional aspect ratio preservation.
Node IDScaleImageAction
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Source File Path sourceFilePath | file_picker | Yes | — | The full path to the source image to scale (e.g., "C:/temp/image.png"). |
Output File Path (Optional) outputFilePath | file_picker | No | — | The full path to save the scaled image. If blank, it will save next to the source with a "_scaled" suffix. |
Target Width width | integer min 0 | Yes | 512 | The target width in pixels. |
Target Height height | integer min 0 | Yes | 512 | The target height in pixels. |
Keep Aspect Ratio keepAspectRatio | boolean | No | true | If true, fits the image within the target dimensions, preserving aspect ratio. If false, stretches to exact dimensions. |
Resampling Filter filter | enum | Yes | Lanczos3 | The algorithm used for resampling. Lanczos3 is high quality, Nearest is fast. |
Overwrite overwrite | boolean | No | false | If true, overwrites an existing file at the output path. |
Create Directory createDirectory | boolean | No | true | If true, creates the parent directory for the output file if it doesn't exist. |
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
Execute input0 | object | Yes | Triggers the image scaling. |
Outputs
| Output | Type | Identifier | Description |
|---|---|---|---|
On Success output0 | object | outputFilePath | Fires on success and contains the new file path as data. |