decodeAnimation
fun decodeAnimation(data: ByteArray, applyOrientation: Boolean = false, cancellationCheck: () -> Unit? = null): KiteAnimation
Decode data as an animation. GIF returns every composited frame with delays and the loop count; static formats return a single zero-delay frame, so this is safe to call on anything decode accepts.
cancellationCheck, when given, runs between frames of a multi-frame decode and may throw to abandon work whose result no longer matters (pass { coroutineContext.ensureActive() } from a coroutine). Static formats decode in one step and never invoke it.
applyOrientation honours the EXIF orientation tag on every frame, the same way decode does for a still.