ComfyUI > Nodes > Bjornulf_custom_nodes > ▢➜⬛ Remove image Transparency (alpha)

ComfyUI Node: ▢➜⬛ Remove image Transparency (alpha)

Class Name

Bjornulf_RemoveTransparency

Category
Bjornulf
Author
justUmen (Account age: 3046days)
Extension
Bjornulf_custom_nodes
Latest Updated
2025-02-28
Github Stars
0.2K

How to Install Bjornulf_custom_nodes

Install this extension via the ComfyUI Manager by searching for Bjornulf_custom_nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Bjornulf_custom_nodes 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

▢➜⬛ Remove image Transparency (alpha) Description

Image transparency handling node for converting alpha channel to standard RGB with background recovery or replacement.

▢➜⬛ Remove image Transparency (alpha):

The Bjornulf_RemoveTransparency node is designed to handle images with transparency by either recovering the original background or replacing the transparent areas with a specified background color. This node is particularly useful for artists and designers who need to prepare images for environments that do not support transparency or when a uniform background is desired. By processing the alpha channel of an image, it ensures that the final output is a standard RGB image, making it compatible with a wide range of applications and platforms. The node provides flexibility by allowing users to choose between recovering the original background or applying a new one, thus offering creative control over the final appearance of the image.

▢➜⬛ Remove image Transparency (alpha) Input Parameters:

image

The image parameter is the primary input for the node, representing the image that you want to process. This image should ideally have an alpha channel if you wish to manipulate transparency. The node will check for the presence of this channel and proceed accordingly. If the image does not have an alpha channel, it will be returned unchanged. This parameter is crucial as it determines the content that will be processed and potentially altered by the node.

recover_background

The recover_background parameter is a boolean option that dictates whether the original background of the image should be preserved. When set to True, the node will ignore the specified background color and retain the original RGB values of the image, effectively removing the transparency without altering the background. The default value is False, which means the node will apply the specified background color to the transparent areas unless otherwise specified.

background_color

The background_color parameter allows you to choose the color that will replace the transparent areas of the image. You can select from three options: "black", "white", or "greenscreen". Each option provides a different aesthetic and can be used to match the image to a specific theme or requirement. The default color is "black", which is often used for a neutral or dark background. This parameter is only relevant if recover_background is set to False.

▢➜⬛ Remove image Transparency (alpha) Output Parameters:

IMAGE

The output parameter is an IMAGE, which is the processed version of the input image. This output will always be in RGB format, ensuring compatibility with systems that do not support transparency. If the input image had an alpha channel, the transparency will be handled according to the specified parameters, resulting in an image with either the original background or a new one applied. This output is essential for further processing or direct use in projects where transparency is not desired.

▢➜⬛ Remove image Transparency (alpha) Usage Tips:

  • To maintain the original look of an image while removing transparency, set recover_background to True. This is useful when you want to preserve the existing background details.
  • Use the background_color parameter to match the image's background with your project's theme. For example, use "greenscreen" if you plan to replace the background later in a video editing software.

▢➜⬛ Remove image Transparency (alpha) Common Errors and Solutions:

Image does not have an alpha channel

  • Explanation: The input image does not contain an alpha channel, which means there is no transparency to process.
  • Solution: Ensure that the image you are using has an alpha channel if you intend to manipulate transparency. If not, the node will simply return the original image.

Invalid background color option

  • Explanation: The specified background_color is not one of the accepted values ("black", "white", "greenscreen").
  • Solution: Double-check the background_color parameter and ensure it is set to one of the valid options.

▢➜⬛ Remove image Transparency (alpha) Related Nodes

Go back to the extension to check out more related nodes.
Bjornulf_custom_nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.