Visit ComfyUI Online for ready-to-use ComfyUI environment
Draw straight lines on image canvas with specified start/end points, color, thickness, and transparency for linear design elements.
The ImageDrawLine
node is designed to draw straight lines on an image canvas, providing a simple yet powerful way to add linear elements to your artwork. This node allows you to specify the start and end points of the line, as well as its color, thickness, and transparency. By leveraging this node, you can enhance your images with precise lines, which can be useful for creating borders, dividers, or any other linear design elements. The node also supports Super-Sampling Anti-Aliasing (SSAA) to ensure smooth and high-quality lines, and it allows you to choose the resampling method for resizing the canvas, ensuring that the final output meets your quality standards.
This parameter represents the input image container on which the line will be drawn. It is typically a tensor that holds the image data.
This parameter defines the thickness of the line. A larger value results in a thicker line, while a smaller value produces a thinner line. The default value is usually set to 1.
This parameter specifies the x-coordinate of the starting point of the line. It is a relative value between 0 and 1, where 0 represents the left edge of the image and 1 represents the right edge.
This parameter specifies the y-coordinate of the starting point of the line. It is a relative value between 0 and 1, where 0 represents the top edge of the image and 1 represents the bottom edge.
This parameter specifies the x-coordinate of the ending point of the line. It is a relative value between 0 and 1, where 0 represents the left edge of the image and 1 represents the right edge.
This parameter specifies the y-coordinate of the ending point of the line. It is a relative value between 0 and 1, where 0 represents the top edge of the image and 1 represents the bottom edge.
This parameter sets the red component of the line color. It is an integer value between 0 and 255.
This parameter sets the green component of the line color. It is an integer value between 0 and 255.
This parameter sets the blue component of the line color. It is an integer value between 0 and 255.
This parameter sets the transparency of the line. It is a float value between 0 and 1, where 0 is fully transparent and 1 is fully opaque.
This parameter enables Super-Sampling Anti-Aliasing (SSAA) to improve the quality of the line. It is an integer value that determines the level of SSAA. Higher values result in smoother lines but require more processing power.
This parameter specifies the resampling method used when resizing the canvas. Common methods include "nearest", "bilinear", and "bicubic". The choice of method affects the quality and performance of the resizing operation.
The output is an image tensor with the drawn line. This tensor can be used for further processing or directly rendered as an image. The line will be drawn according to the specified parameters, and the output image will reflect these changes.
© Copyright 2024 RunComfy. All Rights Reserved.