xtract.bot

GIF → animated PNG (APNG)

Try it interactively →
POST /api/gif-to-apng

Convert 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.

Re-encodes an animated GIF as an animated PNG (APNG). Every frame is composited (handling GIF's disposal modes), encoded losslessly, and packed into a standard APNG file. APNGs are a strict superset of PNG — a viewer that doesn't know about animation just sees the first frame, so the output works as a fallback PNG too. Compared to animated WebP, APNGs are larger but render correctly in older browsers and image viewers.

Inputs

NameTypeDefaultDescription
gif*fileInput 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"'"
}'