画像ツール
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 · Interactive
クイック操作
入力ファイル 1出力ファイル 1–999
入力
この Tool が受け付ける入力形式とファイル数です。
| 入力種類 | file |
|---|---|
| ファイル数 | 1 – 1 |
| 対応 MIME | image/png, image/webp |
パラメータ
これらの値は request.options で渡します。
| パラメータ | 型 | 必須 | 既定値 | 許可値 / 範囲 | 説明 |
|---|---|---|---|---|---|
alphaThreshold |
integer | 任意 | 8 |
0 – 80 | Pixels with alpha at or below this value are treated as transparent. |
minAreaPercent |
number | 任意 | 0.2 |
0.01 – 3 | Minimum detected object area as a percentage of total image area. |
mergeDistance |
integer | 任意 | 18 |
0 – 80 | Merge nearby detected components within this many pixels. |
padding |
integer | 任意 | 8 |
0 – 64 | Transparent padding around each extracted object in pixels. |
normalize |
boolean | 任意 | false |
— | Place every extracted object on the same transparent canvas size. |
resizeLongSide |
integer | 任意 | 0 |
0 – 8192 | Maximum long side for each extracted object. 0 keeps original size. |
出力
処理完了後に返される結果形式です。
| 型 | files |
|---|---|
| ファイル数 | 1 – 999 |
| 出力 MIME | image/png |
| Metadata | width, height, inputBytes, outputBytes, objectCount |
| ZIP アーカイブ | 対応 · threshold 2 |
基本例
対応する統合モードを確認し、生成された開始コードをコピーできます。
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.