2.3 KiB
2.3 KiB
Image Alpha Split - Extract alpha and flatten to background
Node Purpose: Image Alpha Split extracts the input image alpha as a mask output, while also compositing transparent areas onto background_color and returning the processed RGB image.
Inputs
| Name | Port | Type | Default | Range | Description |
|---|---|---|---|---|---|
image |
- | IMAGE | - | - | Input image, supports single image or batch; RGBA inputs extract alpha and composite against the background color; both outputs are empty when it is empty |
background_color |
- | STRING | 1.0 |
named / #RRGGBB / r,g,b / 0~1 grayscale / single-letter shorthand / sm |
Background color used to fill transparent areas; sm selects black, white, or #808080 per frame for subject and edge visibility |
Outputs
| Name | Type | Description |
|---|---|---|
image |
IMAGE | RGB image flattened onto the selected background |
mask |
MASK | Alpha mask extracted from the input image; becomes a full-white mask when the input has no alpha |
Features
- Empty
image(unconnected or a zero-length batch): both theimageandmaskoutputs are empty. - RGBA input: returns the original alpha as
maskand composites transparency ontobackground_color; withsm, it selects black, white, or#808080per frame based on composited subject and translucent-edge visibility. - RGB input: passes
imagethrough unchanged and returns a full-whitemask. - Batch support: image batches are processed frame by frame and return synchronized
imageandmaskoutputs. - Color parsing follows the same rules as the
Image Solidnode.
Typical Usage
- Split alpha from transparent PNGs while also generating a background-filled preview or downstream-safe RGB image.
- Prepare white-background images for nodes that do not support alpha, while keeping the transparent area as a mask.
- Standardize batch workflows that need both a flattened image and the original alpha mask.
Notes & Tips
- The
imageoutput is always RGB and does not preserve the original alpha channel. - If the input image has no alpha channel,
maskbecomes fully white andbackground_colordoes not affect the image result. - When
imageis empty no placeholder is built: bothimageandmaskare returned empty so downstream branches can short-circuit.