Reduce APNG frames and keep the timing
Admin ·
Removing some frames can make a short animation lighter while keeping its overall play time. Use the built-in example to check precisely which frames and delays remain.
Keep frames one and three
Select Load example and leave Keep frames on Every second frame. Keep Preserve displayed colors, then compress. The 8 × 6 animation goes from four frames to two. Its stored time stays 790 ms per play and it plays three times.
| Retained frame | Source group | Saved delay |
|---|---|---|
| 1 | Frames 1–2, 110 + 200 ms | 310 ms |
| 3 | Frames 3–4, 310 + 170 ms | 480 ms |
W3C PNG Third Edition, APNG frame structure and frame-control fields
Inspect transparent areas and color changes
Compare the original and saved previews. The retained blue frame has partial opacity. The checkerboard remains visible through those pixels.
Choose a per-frame color limit to group similar visible colors. The alpha values of the retained frames are preserved. A lower limit can make gradients show larger color steps.
W3C PNG Third Edition, APNG frame structure and frame-control fields
Save the animation and check its timing evidence
Download APNG and Download timing JSON. The JSON records the kept frame numbers, loop count and exact numerator and denominator of each delay in seconds.
Use the measured file sizes to decide whether the result fits your destination. Keeping every frame and color returns the original bytes when re-encoding is no smaller.
W3C PNG Third Edition, APNG frame structure and frame-control fields
Common questions
What happens when a combined delay cannot be stored exactly?
Choose a smaller frame step. The tool reports that the summed delay cannot fit APNG's time fields.
Can I use the same tool for a still PNG?
Use Transparent PNG Compressor for still images. This workflow uses the frame timeline in an APNG.