ComfyUI  >  Nodes  >  Allor Plugin >  ImageDrawArc

ComfyUI Node: ImageDrawArc

Class Name

ImageDrawArc

Category
image/draw
Author
Nourepide (Account age: 2900 days)
Extension
Allor Plugin
Latest Updated
5/22/2024
Github Stars
0.2K

How to Install Allor Plugin

Install this extension via the ComfyUI Manager by searching for  Allor Plugin
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Allor Plugin in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ImageDrawArc Description

Draw curved lines and shapes on image canvas with control over color, thickness, and transparency for smooth rendering.

ImageDrawArc:

The ImageDrawArc node is designed to draw an arc on an image canvas, providing a versatile tool for creating curved lines and shapes in your artwork. This node allows you to specify the start and end points of the arc, as well as the color, thickness, and transparency, giving you full control over the appearance of the arc. By leveraging the Super-Sampling Anti-Aliasing (SSAA) technique, it ensures smooth and high-quality rendering of the arc, making it an essential component for detailed and precise image manipulation tasks.

ImageDrawArc Input Parameters:

width

The width of the canvas on which the arc will be drawn. This parameter determines the horizontal size of the image. The value should be a positive integer representing the number of pixels.

height

The height of the canvas on which the arc will be drawn. This parameter determines the vertical size of the image. The value should be a positive integer representing the number of pixels.

size

The thickness of the arc line. This parameter controls how bold or thin the arc appears. The value should be a positive integer, with higher values resulting in a thicker arc.

start_x

The starting x-coordinate of the arc, specified as a fraction of the canvas width. This parameter determines where the arc begins horizontally. The value should be a float between 0 and 1.

start_y

The starting y-coordinate of the arc, specified as a fraction of the canvas height. This parameter determines where the arc begins vertically. The value should be a float between 0 and 1.

end_x

The ending x-coordinate of the arc, specified as a fraction of the canvas width. This parameter determines where the arc ends horizontally. The value should be a float between 0 and 1.

end_y

The ending y-coordinate of the arc, specified as a fraction of the canvas height. This parameter determines where the arc ends vertically. The value should be a float between 0 and 1.

start

The starting angle of the arc in degrees. This parameter defines the angle at which the arc begins, measured from the x-axis. The value should be a float, with 0 degrees representing the rightmost point on the circle.

end

The ending angle of the arc in degrees. This parameter defines the angle at which the arc ends, measured from the x-axis. The value should be a float, with 360 degrees representing a full circle.

red

The red component of the arc color. This parameter determines the intensity of the red color in the arc, with values ranging from 0 to 255.

green

The green component of the arc color. This parameter determines the intensity of the green color in the arc, with values ranging from 0 to 255.

blue

The blue component of the arc color. This parameter determines the intensity of the blue color in the arc, with values ranging from 0 to 255.

alpha

The transparency level of the arc. This parameter controls how opaque or transparent the arc appears, with values ranging from 0 (completely transparent) to 1 (completely opaque).

SSAA

The Super-Sampling Anti-Aliasing factor. This parameter enhances the quality of the arc by rendering it at a higher resolution and then downscaling it. The value should be a positive integer, with higher values resulting in smoother edges.

method

The resampling method used when resizing the canvas back to its original dimensions. This parameter determines the quality of the downscaling process. Common methods include Image.NEAREST, Image.BILINEAR, and Image.BICUBIC.

ImageDrawArc Output Parameters:

IMAGE

The output is an image tensor containing the drawn arc. This tensor can be used in subsequent image processing nodes or saved as an image file. The output image retains the specified dimensions and incorporates the drawn arc with the defined properties.

ImageDrawArc Usage Tips:

  • To achieve smoother arcs, increase the SSAA value, which will render the arc at a higher resolution before downscaling.
  • Experiment with different start and end angles to create various arc shapes, from simple curves to complex circular segments.
  • Use the alpha parameter to blend the arc with the background, creating effects such as semi-transparent overlays.

ImageDrawArc Common Errors and Solutions:

ValueError: image has wrong mode

  • Explanation: This error occurs when the image mode is not set to "RGBA", which is required for transparency.
  • Solution: Ensure that the canvas is created with the mode "RGBA" by using Image.new("RGBA", (width, height), (0, 0, 0, 0)).

TypeError: integer argument expected, got float

  • Explanation: This error occurs when a parameter that expects an integer receives a float value.
  • Solution: Check the input parameters and ensure that values for width, height, size, and SSAA are integers.

IndexError: list index out of range

  • Explanation: This error occurs when accessing elements in the container that do not exist.
  • Solution: Verify that the container has the correct dimensions and contains the expected data before passing it to the node.

ImageDrawArc Related Nodes

Go back to the extension to check out more related nodes.
Allor Plugin
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.