Todas as Tools›Transparent Image Splitter
Ferramentas de imagem

Transparent Image Splitter

transparent-image-splitter

Use Transparent Image Splitter through the Zavilo SDK. Check input limits, parameters, output and supported modes below.

H · HeadlessI · InteractiveE · Embedded
ID da Tooltransparent-image-splitter
Versão1
ExecuçãoCLIENT
ModosHeadless, Interactive, Embedded

Ações rápidas

Arquivos de entrada 1Arquivos de saída 1–999

Entrada

Formatos de entrada e quantidade de arquivos aceitos por esta Tool.

Tipo de entradafile
N.º de arquivos1 – 1
MIME aceitosimage/png, image/webp

Parâmetros

Passe estes valores por request.options.

Parâmetro Tipo Obrigatório Padrão Valores / Faixa Descrição
alphaThreshold integer Opcional 8 0 – 80 Pixels with alpha at or below this value are treated as transparent.
minAreaPercent number Opcional 0.2 0.01 – 3 Minimum detected object area as a percentage of total image area.
mergeDistance integer Opcional 18 0 – 80 Merge nearby detected components within this many pixels.
padding integer Opcional 8 0 – 64 Transparent padding around each extracted object in pixels.
normalize boolean Opcional false — Place every extracted object on the same transparent canvas size.
resizeLongSide integer Opcional 0 0 – 8192 Maximum long side for each extracted object. 0 keeps original size.

Saída

Formato do resultado retornado após o processamento.

Tipofiles
N.º de arquivos1 – 999
MIME de saídaimage/png
Metadatawidth, height, inputBytes, outputBytes, objectCount
Arquivo ZIPSuportado · threshold 2

Uso básico

Escolha um modo suportado e copie o código inicial gerado.

Headless

const result = await client.run("transparent-image-splitter", {
  file,
  options: { alphaThreshold: 8, minAreaPercent: 0.2, mergeDistance: 18, padding: 8 }
});
console.log(result.files, result.data, result.metadata);

Interactive

await client.open({
  tool: "transparent-image-splitter",
  input: { file },
  options: { alphaThreshold: 8, minAreaPercent: 0.2, mergeDistance: 18, padding: 8 },
  onComplete(result) { console.log(result.files, result.data, result.metadata); }
});

Embedded

await client.mount({ tool: "transparent-image-splitter", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.