📁 上传帧图片
🖼️

点击选择 或 拖拽图片到此处

支持 PNG / JPG,最多 60 帧,单张建议不超过 10 MB

⚙️ 编码参数
10

每帧间隔 100ms

0 = 无限循环

✅ 生成结果
生成结果预览
⬇️ 下载文件
POST /api/encode

以 multipart/form-data 格式上传图片及参数,返回二进制动图文件。

表单字段

images # File[] — PNG/JPG,必填,最多 60 张 format # string — "gif" | "apng",默认 "gif" fps # int — GIF 1~60 / APNG 1~120,默认 10 loop # int — 循环次数,0=无限,默认 0 width # int — 输出宽度 1~4096,需与 height 同时指定 height # int — 输出高度 1~4096,需与 width 同时指定

cURL 示例

curl -X POST https://your-worker.workers.dev/api/encode \ -F "images=@frame1.png" \ -F "images=@frame2.png" \ -F "fps=24" \ -F "format=apng" \ -o output.png

GET /api/info

查询支持的格式、帧率范围等能力信息。

{ "formats": ["gif", "apng"], "fps": { "gif": { "min": 1, "max": 60 }, "apng": { "min": 1, "max": 120 } }, "maxImages": 60, "maxDimension": 4096 }

GET /api/health

健康检查。返回 {"ok":true}。