Action Image
Remove Background
Removes the background from an image with support for gradual transparency (glows, shadows, etc.). Supports smart edge detection mode or color key (chroma key) mode.
Node IDRemoveBackgroundAction
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Source File Path sourceFilePath | file_picker | Yes | — | The full path to the source image (e.g., "C:/temp/image.png"). |
Output File Path outputFilePath | file_picker | Yes | — | The full path to save the image with transparent background (must be PNG format). |
Mode mode | enum | Yes | smart | 'smart' uses edge detection to remove background, 'colorKey' removes a specific color. |
Key Color keyColor | color | No | [0,255,0] | The RGB color to remove (e.g., [0, 255, 0] for green screen). Only used in 'colorKey' mode. |
Color Tolerance tolerance | range min 0 , max 255 | No | 30 | How much variation from the key color to accept (0-255). Higher values remove more similar colors. |
Edge Threshold (Smart Mode) edgeThreshold | range min 0 , max 255 | No | 128 | Threshold for edge detection in smart mode. Lower values are more aggressive. |
Gradual Transparency gradualTransparency | boolean | No | true | If true, creates smooth alpha transitions for glows and semi-transparent areas. If false, pixels are either fully opaque or fully transparent. |
Feather Radius featherRadius | integer min 0 , max 20 | No | 2 | Smooths the transparency transition at edges (in pixels). Higher values create softer edges. Only used when Gradual Transparency is enabled. |
Preserve Original Alpha preserveAlpha | boolean | No | true | If true, preserves existing alpha channel from source image and combines it with background removal. |
Overwrite overwrite | boolean | No | false | If true, overwrites an existing file at the output path. |
Create Directory createDirectory | boolean | No | true | If true, creates the parent directory for the output file if it doesn't exist. |
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
Execute input0 | object | Yes | Triggers the background removal. |
Outputs
| Output | Type | Identifier | Description |
|---|---|---|---|
Output Path output0 | string | outputFilePath | The path to the saved image with transparent background. |