Công cụ hình ảnh
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
Quick actions
Input files 1Output files 1–999
Đầu vào
Accepted input contract for this Tool.
| Kind | file |
|---|---|
| File count | 1 – 1 |
| Accepted MIME types | image/png, image/webp |
Tham số
Pass these values through request.options.
| Parameter | Type | Bắt buộc | Mặc định | Giá trị / Phạm vi | Mô tả |
|---|---|---|---|---|---|
alphaThreshold |
integer | Optional | 8 |
0 – 80 | Pixels with alpha at or below this value are treated as transparent. |
minAreaPercent |
number | Optional | 0.2 |
0.01 – 3 | Minimum detected object area as a percentage of total image area. |
mergeDistance |
integer | Optional | 18 |
0 – 80 | Merge nearby detected components within this many pixels. |
padding |
integer | Optional | 8 |
0 – 64 | Transparent padding around each extracted object in pixels. |
normalize |
boolean | Optional | false |
— | Place every extracted object on the same transparent canvas size. |
resizeLongSide |
integer | Optional | 0 |
0 – 8192 | Maximum long side for each extracted object. 0 keeps original size. |
Đầu ra
Result contract returned after successful processing.
| Type | files |
|---|---|
| File count | 1 – 999 |
| MIME types | image/png |
| Metadata | width, height, inputBytes, outputBytes, objectCount |
| ZIP archive | Yes · threshold 2 |
Ví dụ cơ bản
Choose a supported integration mode and copy the generated starter code.
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.