KiteAnimation
A decoded animation: GIF, APNG, animated WebP, animated AVIF and animated JPEG XL all arrive in this shape. Static images decode as a single frame, so ImageKodec.decodeAnimation is total over every supported format.
loopCount means the same thing in all three formats: 0 = loop forever, n > 0 = play the sequence n times. A file that carries no loop count at all gets 1 (play once), which is what its absence has always meant in practice.
loopCount is a Long so APNG's full four-byte play field is preserved, including counts above the PNG Third Edition integer limit accepted for compatibility with deployed APNG writers.
Throws
Constructors
Properties
Sum of frame delays for one loop, in milliseconds. It stops at Int.MAX_VALUE instead of wrapping.
Functions
cropped applied to every frame, preserving delays and loop count.
Downscale every frame to exactly targetWidth×targetHeight with KiteBitmap.downscaledTo, preserving delays and the play count. Equal canvas dimensions return this instance.
flippedHorizontal applied to every frame.
flippedVertical applied to every frame.
oriented applied to every frame, preserving delays and loop count.
rotated180 applied to every frame.
rotated270 applied to every frame.
rotated90 applied to every frame.
Downscale every frame of an animation to fit inside maxWidth×maxHeight (same box filter and aspect handling as KiteBitmap.scaled), preserving delays and the loop count. This is where animated memory goes: a full-screen GIF shown as an avatar keeps W×H×4 bytes per frame unless scaled down.
transposed applied to every frame.
transversed applied to every frame.