Todas as Tools›Resize Image
Ferramentas de imagem

Resize Image

resize-image

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

H · HeadlessE · Embedded
ID da Toolresize-image
Versão1
ExecuçãoCLIENT
ModosHeadless, 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
width integer Opcional — 1 – 16384 Target width in pixels. At least width or height is required.
height integer Opcional — 1 – 16384 Target height in pixels. At least width or height is required.
keepAspectRatio boolean Opcional true — Preserve aspect ratio. When width and height are both provided, fit inside that box.
format enum Opcional original original | jpg | png | webp Output image format.
quality number Opcional 0.92 0.5 – 1 Output quality from 0.5 to 1.0.

Saída

Formato do resultado retornado após o processamento.

Tipofiles
N.º de arquivos1 – 1
MIME de saídaimage/jpeg, image/png, image/webp
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("resize-image", {
  file,
  options: { keepAspectRatio: true, format: "original" }
});
console.log(result.files, result.data, result.metadata);

Embedded

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