Visit ComfyUI Online for ready-to-use ComfyUI environment
Resize images with padding to maintain aspect ratio and fit specific dimensions seamlessly.
The ImageResize_Padding
node is designed to resize an image to a specified width and height while optionally adding padding to maintain the original aspect ratio. This node is particularly useful when you need to fit an image into a specific dimension without distorting its content. By adding padding, the node ensures that the image's aspect ratio is preserved, preventing any stretching or squishing. The padding can be customized with specific colors, allowing for a seamless integration of the image into various backgrounds or layouts. This node is ideal for preparing images for further processing or display, ensuring they meet the required dimensions while maintaining their visual integrity.
This parameter represents the input image that you want to resize and optionally pad. The image should be in a format that the node can process, typically a tensor or array.
This parameter specifies the target width for the resized image. It determines the final width of the output image after resizing and padding. The value should be an integer representing the number of pixels.
This parameter specifies the target height for the resized image. It determines the final height of the output image after resizing and padding. The value should be an integer representing the number of pixels.
This boolean parameter determines whether padding should be added to the image to maintain its aspect ratio. If set to True
, the node will calculate and add the necessary padding to ensure the original aspect ratio is preserved.
This parameter specifies the red component of the padding color. It should be an integer between 0 and 255, where 0 represents no red and 255 represents full red.
This parameter specifies the green component of the padding color. It should be an integer between 0 and 255, where 0 represents no green and 255 represents full green.
This parameter specifies the blue component of the padding color. It should be an integer between 0 and 255, where 0 represents no blue and 255 represents full blue.
This parameter specifies the interpolation method used for resizing the image. The default value is "nearest", but other methods like "bilinear" or "bicubic" can be used depending on the desired quality and performance.
This parameter represents the resized and optionally padded image. It is the final output of the node, ready for further processing or display.
This parameter represents the width of the output image. It confirms the final width after resizing and padding.
This parameter represents the height of the output image. It confirms the final height after resizing and padding.
padding
parameter to True
.Red
, Green
, and Blue
parameters to match the background or layout where the image will be used.width
and height
parameters.Red
, Green
, or Blue
parameter is outside the valid range.© Copyright 2024 RunComfy. All Rights Reserved.