GIF → animated PNG (APNG)
Try it interactively →POST /api/gif-to-apngConvert an animated GIF to an animated PNG (APNG). Preserves every frame and its delay. APNGs are backwards compatible — viewers that don't understand the animation chunks just show the first frame.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| gif* | file | — | Input animated GIF. |
Response
Modes: binary, json. Cache: yes (24h TTL).
Code samples
Built from the dog example.
# Download or substitute the example input:
# curl -O https://xtract.bot/examples/gif-extract-frames/dog.gif
GIF=$(base64 -w0 < dog.gif)
curl -X POST https://api.xtract.bot/api/gif-to-apng \
-H "Content-Type: application/json" \
-H "Accept: application/octet-stream" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"gif": "'"$GIF"'"
}'