Skip to main content
The ImageScaleToMaxDimension node resizes images to fit within a specified maximum dimension while maintaining the original aspect ratio. It calculates whether the image is portrait or landscape oriented, then scales the larger dimension to match the target size while proportionally adjusting the smaller dimension. The node supports multiple upscaling methods for different quality and performance requirements.

Inputs

ParameterDescriptionData TypeRequiredRange
imageThe input image to be scaledIMAGEYes-
upscale_methodThe interpolation method used for scaling the image (default: “area”)STRINGYes”area"
"lanczos"
"bilinear"
"nearest-exact"
"bilinear"
"bicubic”
largest_sizeThe maximum dimension for the scaled image (default: 512)INTYes0 to 16384

Outputs

Output NameDescriptionData Type
imageThe scaled image with the largest dimension matching the specified sizeIMAGE
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): 83eba56d9f673fb570edc6504fd82f1274ead1d3e055a1a8bcc207c178388015