APNG to Sprite Sheet Converter
Convert APNG animated files to sprite sheets online. Extract frames, configure grid layout, padding, and export as PNG sprite atlas instantly.
Drop APNG file here or click to browse
Accepts .png / .apng files up to 50 MB
About
APNG (Animated Portable Network Graphics) stores frame sequences within a single PNG container using acTL, fcTL, and fdAT chunks defined in the APNG specification. Game engines, CSS animation pipelines, and rendering frameworks typically require a flat sprite sheet rather than an animated container. Manual extraction via hex editors or frame-by-frame export in graphics software introduces alignment errors and inconsistent padding, which propagate as visual artifacts during playback at target frame rates. This tool parses the binary APNG chunk structure directly, reconstructs each frame respecting dispose_op and blend_op flags, and composites them into a configurable grid with uniform cell dimensions of W × H pixels per frame.
Limitations apply: APNG files with variable frame dimensions are normalized to the canvas size declared in the IHDR chunk. Files exceeding 50MB or 500 frames may degrade browser performance. The tool approximates disposal operations in-browser using Canvas 2D compositing. Pro tip: verify your output sprite sheet dimensions against your engine's maximum texture size (commonly 4096 × 4096 or 8192 × 8192 pixels).
Formulas
The sprite sheet grid layout is computed from the total number of extracted frames N, the user-specified column count C, and the inter-frame padding P.
Row count:
R = ceil(NC)Total sheet width:
Wsheet = C × (Wframe + P) − PTotal sheet height:
Hsheet = R × (Hframe + P) − PFrame position for index i (zero-based):
xi = (i mod C) × (Wframe + P)yi = floor(iC) × (Hframe + P)
Where Wframe and Hframe are the canvas dimensions from the IHDR chunk, P is the pixel padding between cells, C is columns, and R is the computed row count. The delay for frame i is encoded as delay_numdelay_den seconds in each fcTL chunk, where delay_den = 0 is treated as 100.
Reference Data
| APNG Chunk | Type Code | Purpose | Required |
|---|---|---|---|
| Image Header | IHDR | Canvas width, height, bit depth, color type | Yes |
| Animation Control | acTL | Total frame count, loop count | Yes (APNG) |
| Frame Control | fcTL | Frame dimensions, offsets, delay, dispose/blend ops | Yes (per frame) |
| Frame Data | fdAT | Compressed image data for non-default frames | Yes (frames 1+) |
| Image Data | IDAT | Default image / first frame compressed data | Yes |
| Image End | IEND | Marks end of PNG datastream | Yes |
| Dispose Operation | Value | Behavior |
|---|---|---|
| APNG_DISPOSE_OP_NONE | 0 | Leave frame buffer unchanged |
| APNG_DISPOSE_OP_BACKGROUND | 1 | Clear frame region to transparent black |
| APNG_DISPOSE_OP_PREVIOUS | 2 | Restore buffer to state before current frame |
| Blend Operation | Value | Behavior |
|---|---|---|
| APNG_BLEND_OP_SOURCE | 0 | Overwrite region with frame data |
| APNG_BLEND_OP_OVER | 1 | Alpha-composite frame over buffer |
| Engine / Platform | Max Texture Size | Sprite Sheet Format | Notes |
|---|---|---|---|
| Unity | 8192 × 8192 | PNG, TGA | Use Sprite Editor for slicing |
| Unreal Engine | 8192 × 8192 | PNG, BMP | Flipbook material node |
| Godot | 16384 × 16384 | PNG | AnimatedSprite2D node |
| Phaser.js | 4096 × 4096 | PNG + JSON | WebGL texture limit varies |
| CSS Animation | Unlimited (DOM) | PNG | background-position stepping |
| PixiJS | 4096 × 4096 | PNG + JSON | Spritesheet loader built-in |
| RPG Maker | 4096 × 4096 | PNG | Fixed grid conventions |
| GameMaker | 8192 × 8192 | PNG | Texture page settings |
| Cocos2d-x | 4096 × 4096 | PNG + plist | TexturePacker compatible |
| Love2D | 16384 × 16384 | PNG | Quad-based slicing |