Apng Encoder
Writes an animated PNG: PngCodec encodes each frame, and this assembles their chunks. Frame 0 keeps its IDAT chunks, so a reader without APNG shows it. Every frame is the full canvas, replaces what was there and is cleared before the next. A delay is the duration over 1000, so it is exact.
A duration over 65535 ms does not fit the format's 16 bits and is refused with an IllegalArgumentException.