← back to roto on ba3a.dev

ApngEncoder

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.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun encode(frames: ExportFrames, options: AnimationOptions): ByteArray

The file holding frames, prepared as options ask.