Bild-Tools
Remove Background Color
remove-background-color
Use Remove Background Color through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · HeadlessI · Interactive
Schnellzugriff
Eingabedateien 1Ausgabedateien 1
Eingabe
Zulässige Eingabeformate und Dateianzahl für dieses Tool.
| Eingabetyp | file |
|---|---|
| Dateianzahl | 1 – 1 |
| Zulässige MIME-Typen | image/jpeg, image/png, image/webp |
Parameter
Diese Werte über request.options übergeben.
| Parameter | Typ | Erforderlich | Standard | Zulässig / Bereich | Beschreibung |
|---|---|---|---|---|---|
color |
string | Optional | #ffffff |
— | Solid background color as a 6-digit hex value. |
tolerance |
number | Optional | 28 |
0 – 100 | Color tolerance from 0 to 100. |
edgeConnected |
boolean | Optional | true |
— | Remove matching pixels only when connected to an outer image edge. |
Ausgabe
Nach erfolgreicher Verarbeitung zurückgegebenes Ergebnisformat.
| Typ | files |
|---|---|
| Dateianzahl | 1 – 1 |
| Ausgabe-MIME | image/png |
| Metadata | width, height, inputBytes, outputBytes |
| ZIP-Archiv | Nicht unterstützt |
Grundlegende Verwendung
Unterstützten Integrationsmodus wählen und den erzeugten Starter-Code kopieren.
Headless
const result = await client.run("remove-background-color", {
file,
options: { color: "#ffffff", tolerance: 28, edgeConnected: true }
});
console.log(result.files, result.data, result.metadata);
Interactive
await client.open({
tool: "remove-background-color",
input: { file },
options: { color: "#ffffff", tolerance: 28, edgeConnected: true },
onComplete(result) { console.log(result.files, result.data, result.metadata); }
});
Embedded
await client.mount({ tool: "remove-background-color", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.