アイコンツール
Favicon Generator
favicon-generator
Use Favicon Generator through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · HeadlessI · Interactive
クイック操作
入力ファイル 1出力ファイル 1–5
入力
この Tool が受け付ける入力形式とファイル数です。
| 入力種類 | file |
|---|---|
| ファイル数 | 1 – 1 |
| 対応 MIME | image/jpeg, image/png, image/webp |
パラメータ
これらの値は request.options で渡します。
| パラメータ | 型 | 必須 | 既定値 | 許可値 / 範囲 | 説明 |
|---|---|---|---|---|---|
cropX |
integer | 任意 | — | 0 – 32768 | Optional source crop X coordinate. Omit to center the crop. |
cropY |
integer | 任意 | — | 0 – 32768 | Optional source crop Y coordinate. Omit to center the crop. |
cropSize |
integer | 任意 | — | 1 – 32768 | Optional square crop size in source pixels. Omit to use the largest centered square. |
transparent |
boolean | 任意 | true |
— | Keep transparent pixels in generated PNG favicons. |
color |
string | 任意 | #ffffff |
— | Background color used when transparent is false. |
includeIco |
boolean | 任意 | true |
— | Also return favicon.ico built from available 16, 32 and 48 pixel PNG assets. |
出力
処理完了後に返される結果形式です。
| 型 | files |
|---|---|
| ファイル数 | 1 – 5 |
| 出力 MIME | image/png, image/x-icon |
| Metadata | width, height, inputBytes, outputBytes, cropX, cropY, cropSize, outputCount |
| ZIP アーカイブ | 対応 · threshold 2 |
基本例
対応する統合モードを確認し、生成された開始コードをコピーできます。
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.