remove_background
Remove a specified background color from an image, making it transparent. Outputs a PNG with alpha channel. Specify color and tolerance for precision.
Instructions
Remove a background color from an image and make it transparent. Outputs a PNG with alpha channel. The image must already exist in /root/Pictures/pixel-surgeon (use save_image to import first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Filename of the source image in /root/Pictures/pixel-surgeon | |
| color | No | Target background color as hex (e.g. "#FFFFFF" for white, "#000000" for black, "#FF0000" for red). Default: white. | #FFFFFF |
| threshold | No | How far from the target color a pixel can be and still count as background (0 = exact match only, 30 = default, higher = more aggressive) |