Visit ComfyUI Online for ready-to-use ComfyUI environment
Define rectangular region within image/canvas by specifying top-left coordinates, width, and height for precise cropping/selection.
The region-util-get-by-lt
node is designed to help you define a rectangular region within an image or canvas by specifying the coordinates of the top-left corner along with the width and height of the region. This node is particularly useful for tasks that require precise cropping or region selection based on the left and top coordinates. By providing these parameters, the node calculates the center coordinates and the bottom-right corner of the region, making it easier to manage and manipulate specific areas within your artwork. This functionality is essential for AI artists who need to focus on or isolate particular sections of an image for further processing or enhancement.
The left
parameter specifies the x-coordinate of the top-left corner of the region. It determines how far the region is from the left edge of the image or canvas. The value must be an integer between 0 and 10,000,000, with a default value of 0. Adjusting this parameter shifts the region horizontally.
The top
parameter specifies the y-coordinate of the top-left corner of the region. It determines how far the region is from the top edge of the image or canvas. The value must be an integer between 0 and 10,000,000, with a default value of 0. Adjusting this parameter shifts the region vertically.
The w
parameter defines the width of the region. It must be an integer between 0 and 10,000,000, with a default value of 256. This parameter controls the horizontal size of the region, allowing you to expand or contract it as needed.
The h
parameter defines the height of the region. It must be an integer between 0 and 10,000,000, with a default value of 256. This parameter controls the vertical size of the region, allowing you to expand or contract it as needed.
The left
output parameter returns the x-coordinate of the top-left corner of the region, which is the same as the input left
parameter.
The top
output parameter returns the y-coordinate of the top-left corner of the region, which is the same as the input top
parameter.
The right
output parameter provides the x-coordinate of the bottom-right corner of the region. It is calculated based on the left
and w
parameters.
The bottom
output parameter provides the y-coordinate of the bottom-right corner of the region. It is calculated based on the top
and h
parameters.
The cx
output parameter returns the x-coordinate of the center of the region. It is calculated as the midpoint between the left
and right
coordinates.
The cy
output parameter returns the y-coordinate of the center of the region. It is calculated as the midpoint between the top
and bottom
coordinates.
The w
output parameter returns the width of the region, which is the same as the input w
parameter.
The h
output parameter returns the height of the region, which is the same as the input h
parameter.
left
and top
parameters to precisely position the region within your image or canvas.w
and h
parameters to define the exact size of the region you want to work with.left
, top
, w
, or h
are outside the allowed range (0 to 10,000,000).left
, top
, w
, and h
.© Copyright 2024 RunComfy. All Rights Reserved.