Skip to main content
The 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

ParameterDescriptionData TypeRequiredRange
imageThe input image to be resized and paddedIMAGEYes-
target_widthThe desired width of the output image (default: 512)INTYes1 to MAX_RESOLUTION
target_heightThe desired height of the output image (default: 512)INTYes1 to MAX_RESOLUTION
padding_colorThe color to use for padding areas around the resized image (default: “white”)COMBOYes”white"
"black”
interpolationThe interpolation method used for resizing the image (default: “area”)COMBOYes”area"
"bicubic"
"nearest-exact"
"bilinear"
"lanczos”

Outputs

Output NameDescriptionData Type
imageThe resized and padded output imageIMAGE
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): cc516caee9f466d557e1c8e3c7fcef25acc1e33d181bc4b100302dc93530cb95