Skip to main content
The Resize Image/Mask node provides multiple methods to change the dimensions of an input image or mask. It can scale by a multiplier, set specific dimensions, match the size of another input, or adjust based on pixel count, using various interpolation methods for quality.

Inputs

ParameterDescriptionData TypeRequiredRange
inputThe image or mask to be resized.IMAGE or MASKYesN/A
resize_typeThe method used to determine the new size. The required parameters change based on the selected type.COMBOYesSCALE_BY
SCALE_DIMENSIONS
SCALE_LONGER_DIMENSION
SCALE_SHORTER_DIMENSION
SCALE_WIDTH
SCALE_HEIGHT
SCALE_TOTAL_PIXELS
MATCH_SIZE
multiplierThe scaling factor. Required when resize_type is SCALE_BY (default: 1.00).FLOATNo0.01 to 8.0
widthThe target width in pixels. Required when resize_type is SCALE_DIMENSIONS or SCALE_WIDTH (default: 512).INTNo0 to 8192
heightThe target height in pixels. Required when resize_type is SCALE_DIMENSIONS or SCALE_HEIGHT (default: 512).INTNo0 to 8192
cropThe cropping method to apply when dimensions don’t match the aspect ratio. Only available when resize_type is SCALE_DIMENSIONS or MATCH_SIZE (default: “center”).COMBONo"disabled"
"center"
longer_sizeThe target size for the longer side of the image. Required when resize_type is SCALE_LONGER_DIMENSION (default: 512).INTNo0 to 8192
shorter_sizeThe target size for the shorter side of the image. Required when resize_type is SCALE_SHORTER_DIMENSION (default: 512).INTNo0 to 8192
megapixelsThe target total number of megapixels. Required when resize_type is SCALE_TOTAL_PIXELS (default: 1.0).FLOATNo0.01 to 16.0
matchAn image or mask whose dimensions the input will be resized to match. Required when resize_type is MATCH_SIZE.IMAGE or MASKNoN/A
scale_methodThe interpolation algorithm used for scaling (default: “area”).COMBOYes"nearest-exact"
"bilinear"
"area"
"bicubic"
"lanczos"
Note: The crop parameter is only available and relevant when the resize_type is set to SCALE_DIMENSIONS or MATCH_SIZE. When using SCALE_WIDTH or SCALE_HEIGHT, the other dimension is automatically scaled to maintain the original aspect ratio.

Outputs

Output NameDescriptionData Type
resizedThe resized image or mask, matching the data type of the input.IMAGE or MASK
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): 9ac0b153608ac971bb11d9d12ebd1f0f4d6e926604e8727a1bc3a311d95fbc03