Outils image
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
Accès rapide
Fichiers d’entrée 1Fichiers de sortie 1
Entrée
Formats d’entrée et nombre de fichiers acceptés par cette Tool.
| Type d’entrée | file |
|---|---|
| Nombre de fichiers | 1 – 1 |
| MIME acceptés | image/jpeg, image/png, image/webp |
Paramètres
Transmettez ces valeurs via request.options.
| Paramètre | Type | Obligatoire | Par défaut | Valeurs / Plage | Description |
|---|---|---|---|---|---|
color |
string | Optionnel | #ffffff |
— | Solid background color as a 6-digit hex value. |
tolerance |
number | Optionnel | 28 |
0 – 100 | Color tolerance from 0 to 100. |
edgeConnected |
boolean | Optionnel | true |
— | Remove matching pixels only when connected to an outer image edge. |
Sortie
Format du résultat renvoyé après traitement.
| Type | files |
|---|---|
| Nombre de fichiers | 1 – 1 |
| MIME de sortie | image/png |
| Metadata | width, height, inputBytes, outputBytes |
| Archive ZIP | Non pris en charge |
Utilisation de base
Choisissez un mode pris en charge et copiez le code de démarrage généré.
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.