Outils d’icône
Favicon Generator
favicon-generator
Use Favicon Generator 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–5
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 |
|---|---|---|---|---|---|
cropX |
integer | Optionnel | — | 0 – 32768 | Optional source crop X coordinate. Omit to center the crop. |
cropY |
integer | Optionnel | — | 0 – 32768 | Optional source crop Y coordinate. Omit to center the crop. |
cropSize |
integer | Optionnel | — | 1 – 32768 | Optional square crop size in source pixels. Omit to use the largest centered square. |
transparent |
boolean | Optionnel | true |
— | Keep transparent pixels in generated PNG favicons. |
color |
string | Optionnel | #ffffff |
— | Background color used when transparent is false. |
includeIco |
boolean | Optionnel | true |
— | Also return favicon.ico built from available 16, 32 and 48 pixel PNG assets. |
Sortie
Format du résultat renvoyé après traitement.
| Type | files |
|---|---|
| Nombre de fichiers | 1 – 5 |
| MIME de sortie | image/png, image/x-icon |
| Metadata | width, height, inputBytes, outputBytes, cropX, cropY, cropSize, outputCount |
| Archive ZIP | Pris en charge · threshold 2 |
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("favicon-generator", {
file,
options: { transparent: true }
});
console.log(result.files, result.data, result.metadata);
Interactive
await client.open({
tool: "favicon-generator",
input: { file },
options: { transparent: true },
onComplete(result) { console.log(result.files, result.data, result.metadata); }
});
Embedded
await client.mount({ tool: "favicon-generator", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.