Image guides

Reduce APNG frames and keep the timing

·

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.

APNG Compressor

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.

Keep frames one and three
Retained frameSource groupSaved delay
1Frames 1–2, 110 + 200 ms310 ms
3Frames 3–4, 310 + 170 ms480 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.

Sources

Put it into practice.

Related guides