Todas as Tools›Remove Background Color
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 · InteractiveE · Embedded
ID da Toolremove-background-color
Versão1
ExecuçãoCLIENT
ModosHeadless, Interactive, Embedded

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 entradafile
N.º de arquivos1 – 1
MIME aceitosimage/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.

Tipofiles
N.º de arquivos1 – 1
MIME de saídaimage/png
Metadatawidth, height, inputBytes, outputBytes
Arquivo ZIPNã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.