This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHubThe ResizeAndPadImage node resizes an image to fit within specified dimensions while maintaining its original aspect ratio. It scales the image down proportionally to fit within the target width and height, then adds padding around the edges to fill any remaining space. The padding color and interpolation method can be customized to control the appearance of the padded areas and the quality of the resizing.
Inputs
| Parameter | Data Type | Required | Range | Description |
|---|---|---|---|---|
image | IMAGE | Yes | - | The input image to be resized and padded |
target_width | INT | Yes | 1 to MAX_RESOLUTION | The desired width of the output image (default: 512) |
target_height | INT | Yes | 1 to MAX_RESOLUTION | The desired height of the output image (default: 512) |
padding_color | COMBO | Yes | ”white" "black” | The color to use for padding areas around the resized image |
interpolation | COMBO | Yes | ”area" "bicubic" "nearest-exact" "bilinear" "lanczos” | The interpolation method used for resizing the image |
Outputs
| Output Name | Data Type | Description |
|---|---|---|
image | IMAGE | The resized and padded output image |