Visit ComfyUI Online for ready-to-use ComfyUI environment
Modify rectangular regions within an image with precise control over dimensions, position, scaling, and centering for framing and composition.
The AdjustRect
node is designed to modify rectangular regions within an image based on specified parameters. This node allows you to adjust the dimensions and position of a rectangle by scaling and centering it according to given factors. The primary goal of this node is to facilitate precise control over rectangular selections, which can be particularly useful in image processing tasks such as cropping, resizing, or focusing on specific areas of an image. By providing a flexible and intuitive way to manipulate rectangles, AdjustRect
helps you achieve the desired framing and composition in your visual projects.
This parameter represents the first coordinate of the rectangle. It is used as part of the input to define the initial position and size of the rectangle.
This parameter represents the second coordinate of the rectangle. It works in conjunction with the other coordinates to define the initial rectangle.
This parameter represents the third coordinate of the rectangle. It is used to help define the initial dimensions and position of the rectangle.
This parameter represents the fourth coordinate of the rectangle. Along with the other coordinates, it defines the initial rectangle's boundaries.
This parameter specifies the horizontal scaling factor. It determines how much the width of the rectangle should be adjusted. The value should be an even number to ensure proper scaling.
This parameter specifies the vertical scaling factor. It determines how much the height of the rectangle should be adjusted. The value should be an even number to ensure proper scaling.
This parameter defines the rounding mode to be used when calculating the new dimensions of the rectangle. It affects how the scaling factors are applied and rounded.
This parameter specifies the format of the input coordinates. It determines how the initial rectangle coordinates are interpreted and converted.
This parameter specifies the format of the output coordinates. It determines how the adjusted rectangle coordinates are formatted and returned.
The first coordinate of the adjusted rectangle. It represents the new position after scaling and centering.
The second coordinate of the adjusted rectangle. It represents the new position after scaling and centering.
The third coordinate of the adjusted rectangle. It represents the new position after scaling and centering.
The fourth coordinate of the adjusted rectangle. It represents the new position after scaling and centering.
xm
and ym
are even numbers to maintain proper scaling and avoid unexpected results.round_mode
parameter to control how the dimensions are rounded, which can help achieve more precise adjustments.input_format
and output_format
parameters are correctly set to match the coordinate formats you are working with.xm
or ym
are not even numbers.xm
and ym
are set to even numbers to avoid this error.input_format
or output_format
is not recognized.© Copyright 2024 RunComfy. All Rights Reserved.