Visit ComfyUI Online for ready-to-use ComfyUI environment
Add customizable borders to images using OpenCV's `copyMakeBorder` function for artistic and practical purposes.
The CopyMakeBorder node is designed to add a border around an image, which can be useful for various artistic and practical purposes such as framing, padding, or creating a specific visual effect. This node leverages OpenCV's copyMakeBorder
function to extend the edges of an image by a specified number of pixels, using different border types to determine how the new pixels are filled. By using this node, you can easily enhance your images with consistent and customizable borders, making it a valuable tool for AI artists looking to refine their visual outputs.
This parameter represents the input image to which the border will be added. The image should be in a compatible format that the node can process, typically a tensor representation of the image.
This parameter specifies the size of the border to be added around the image. It is an integer value that determines the number of pixels to add to each side of the image. The default value is 64, but you can adjust it according to your needs. Increasing the border size will result in a thicker border, while decreasing it will create a thinner border.
This parameter defines the type of border to be applied. It offers several options, such as BORDER_CONSTANT
, BORDER_REPLICATE
, BORDER_REFLECT
, BORDER_REFLECT101
, and BORDER_WRAP
. Each type determines how the new border pixels are filled. For example, BORDER_CONSTANT
fills the border with a constant value, while BORDER_REFLECT
mirrors the edge pixels. The default border type is BORDER_CONSTANT
.
The output parameter is the image with the added border. This image retains the original content but now includes the specified border around it. The output format is the same as the input format, ensuring compatibility with subsequent processing steps.
border_type
options to achieve various visual effects. For instance, BORDER_REFLECT
can create a mirror-like border, while BORDER_CONSTANT
allows you to specify a solid color.border_size
parameter to control the thickness of the border. Larger values will create more prominent borders, which can be useful for framing or highlighting specific parts of the image.border_type
parameter is set to one of the supported values: BORDER_CONSTANT
, BORDER_REPLICATE
, BORDER_REFLECT
, BORDER_REFLECT101
, or BORDER_WRAP
.border_size
is excessively large, potentially causing memory issues.border_size
parameter to a more reasonable value to avoid memory overflow and ensure smooth processing.© Copyright 2024 RunComfy. All Rights Reserved.