iLoveConverter
Categories 11 categories

APNG: Animated PNG Without the GIF Guilt

iLoveConverter Team 5 min read

On this page

APNG (Animated Portable Network Graphics) is exactly what it sounds like: PNG, but animated. Each frame is a full lossless PNG with full 8-bit alpha transparency — no 256-color palette bottleneck, no dithering, no banding. If you’ve ever exported a GIF of a gradient or a translucent element and watched it turn into a dithered mess, APNG is the fix.

The format was proposed in 2004 by Stuart Parmenter and Vladimir Vukićević of Mozilla, and it became an official PNG extension in 2008. Crucially, it’s backward-compatible: browsers and tools that don’t understand animation will display the first frame as a static PNG. This is why APNG quietly took over WebKit, Chromium, and Firefox — no breakage, no migration path needed.

APNG is increasingly used for memes, product demos, game asset previews, and anywhere you want animation quality better than GIF without the video file size.

Technical details

An APNG file is a standard PNG with three extra chunk types:

ChunkPurpose
acTL (Animation Control)First animation chunk; declares total frame count and repeat count (0 = loop forever)
fcTL (Frame Control)Per-frame chunk; declares x, y offset, width, height, delay (in 1/100 seconds), disposal method
fdAT (Frame Data)Per-frame image data; identical to IDAT but starts with a 4-byte sequence number

Frame disposal methods (fcTL):

  • 0 — Don’t clear; draw new frame over previous
  • 1 — Clear to fully transparent before drawing
  • 2 — Clear to background color (if defined)
  • 3 — Restore to previous frame (rarely used)

Key properties:

  • Lossless. Every frame uses DEFLATE compression, identical to static PNG.
  • Full color + alpha. 24-bit color + 8-bit alpha per frame (or higher with 16-bit per channel).
  • Delta encoding trick. The fcTL offset + disposal method lets you store only the changed region between frames (partial frames), which dramatically reduces file size for motion-only animation.
  • fcTL delay. Minimum delay is 10ms (1/100s). There’s no GIF-style “minimum delay” quirk where browsers ignore delays below 20ms — APNG respects the actual delay.

Size comparison:

Format5-second 720p gradient animation12-frame transparent overlay
GIF~25 MB (dithered, 256 colors)~800 KB
APNG~12 MB (lossless, full alpha)~300 KB
WebP Animated~6 MB (lossy, best quality)~150 KB
MP4~400 KB (H.264, high quality)N/A

Conversion

  • GIF → APNG. Straightforward. Every GIF frame maps to an APNG frame, preserving delay and disposal. Tools: ImageMagick (convert input.gif output.png — yes, ImageMagick auto-detects), ffmpeg, or online converters.
  • APNG → GIF. The challenge is converting lossless full-color frames to 256-color palettes. Expect dithering unless you use palette optimization. Tools: ImageMagick (convert input.png output.gif with -colors 256 -dither), GIMP.
  • Video → APNG. Use ffmpeg -i input.mp4 output.png (ffmpeg auto-treats .png output as APNG for multi-frame input). -vf fps=12 controls frame rate.
  • APNG → Video. ffmpeg -i input.png -c:v libx264 output.mp4. APNG frames are decoded and re-encoded. Lossy conversion — original APNG quality is not preserved in the video output (since video codecs are lossy).

Common problems

  • Partial browser support. IE never supported APNG (IE 11 displays only the first frame). Edge (Chromium-based), Chrome, Firefox, Safari, and modern mobile browsers all support it. If you need to target IE, fall back to GIF.
  • File size for long/high-res animations. A 10-second 1080p APNG can easily hit 50+ MB. Use delta encoding properly (only store changed regions) or consider Animated WebP for better compression.
  • Tooling gaps. Some tools “flatten” APNG into a single-frame PNG on save without warning. Always check that the animation is preserved after round-tripping.
  • No audio. APNG is silent — it’s an image format, not a video format. If you need audio with your animation, use WebM or MP4 with HTML5 <video>.

FAQ

Is APNG better than Animated WebP?

Depends on your needs. APNG is lossless, backward-compatible with PNG tools, and widely supported. Animated WebP is ~50% smaller for equivalent quality but is lossy and has slightly less browser support (Safari <14 didn’t support it). For maximum compatibility, APNG wins. For smallest file size, WebP wins.

Can I edit an APNG frame by frame?

Yes — GIMP (2.8+), Photoshop (imports as layers), Krita, and Piskel all support APNG editing. Each frame becomes a layer. Export back to APNG to preserve animation.

What’s the frame delay resolution?

fcTL delay is in 1/100th of a second (10ms granularity). GIF has the same resolution but most browsers clamp GIF delays to a minimum of 20ms. APNG delays are honored exactly.

Can APNG use different disposal methods per frame?

Absolutely. Each frame has its own fcTL chunk with independent delay and disposal method. This lets you mix partial redraws (disposal 0) with full clears (disposal 1) in the same animation.

Does APNG support 60fps?

Yes. Set the delay to 1 (10ms) for 100fps; delay 2 for 50fps; delay 16 for ~60fps (160ms? wait, let me recalculate). Actually: delay 1 = 10ms per frame = 100fps. Delay 2 = 20ms = 50fps. Delay 1 = 100fps. For 60fps you’d need delay 1 (which gives 100fps — but you can approximate by repeating frames, or use delay 2 for 50fps). There’s no exact 60fps because APNG’s granularity is 10ms, and 60fps needs 16.67ms per frame. Most creators just round to 50 or 100.

Is APNG used anywhere by default?

Yes — Discord, GitHub Gist/SVG (via the .png extension for animated avatars), and many social platforms accept APNG. Steam, Twitch, and Twitter/X also support animated PNG headers and banners.

Try it yourself — free, right in your browser

Everything mentioned in this guide runs locally on this site: no upload, no watermark, no sign-up.

Format deep-dives: APNG (.png) , PNG (.png) , GIF (.gif)