xtract.bot
POST /api/image-webp-to-png

Convert a WebP image to PNG. Lossless. Handles both lossy and lossless WebP inputs; transparency is preserved.

Reads a WebP and returns the same picture as a PNG. Transparency is preserved. Lossy WebP is decoded to its full-quality form first; PNG then losslessly re-encodes those pixels. The PNG output will typically be larger than the WebP input.

Inputs

NameTypeDefaultDescription
image*fileWebP bytes.

Response

Modes: binary, json. Cache: yes (24h TTL).

Code samples

Built from the tile example.

# Download or substitute the example input:
#   curl -O https://xtract.bot/examples/image-webp-to-png/sample.webp
IMAGE=$(base64 -w0 < sample.webp)

curl -X POST https://api.xtract.bot/api/image-webp-to-png \
  -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 '{
  "image": "'"$IMAGE"'"
}'