Ferramentas de imagem
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
Ações rápidas
Arquivos de entrada 1Arquivos de saída 1
Entrada
Formatos de entrada e quantidade de arquivos aceitos por esta Tool.
| Tipo de entrada | file |
|---|---|
| N.º de arquivos | 1 – 1 |
| MIME aceitos | image/jpeg, image/png, image/webp |
Parâmetros
Passe estes valores por request.options.
| Parâmetro | Tipo | Obrigatório | Padrão | Valores / Faixa | Descrição |
|---|---|---|---|---|---|
color |
string | Opcional | #ffffff |
— | Solid background color as a 6-digit hex value. |
tolerance |
number | Opcional | 28 |
0 – 100 | Color tolerance from 0 to 100. |
edgeConnected |
boolean | Opcional | true |
— | Remove matching pixels only when connected to an outer image edge. |
Saída
Formato do resultado retornado após o processamento.
| Tipo | files |
|---|---|
| N.º de arquivos | 1 – 1 |
| MIME de saída | image/png |
| Metadata | width, height, inputBytes, outputBytes |
| Arquivo ZIP | Não suportado |
Uso básico
Escolha um modo suportado e copie o código inicial gerado.
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.