Package-level declarations

Types

Link copied to clipboard
class KiteAnimationImage(val animation: KiteAnimation, val shareable: Boolean = false) : Image

A coil3.Image carrying a full decoded animation. Coil's own machinery treats it as a static image (drawing the first composited frame), which keeps plain AsyncImage working everywhere; KiteAsyncImage detects this type in a successful result and takes over playback with its own frame loop.

Link copied to clipboard
class KiteImageDecoder(source: ImageSource, options: Options, maxCacheableAnimationBytes: Long = Factory.DEFAULT_MAX_CACHEABLE_ANIMATION_BYTES, colorTarget: ColorTarget = ColorTarget.Srgb()) : Decoder

A coil3.decode.Decoder backed by ImageKodec's pure-Kotlin codecs.

Properties

Link copied to clipboard
val ImageRequest.maxFrames: Int

How many frames of an animated image this request decodes at most; every frame by default.

val Options.maxFrames: Int

How many frames of an animated image the decoder decodes at most; every frame by default.

Functions

Link copied to clipboard
@Composable
fun KiteAsyncImage(model: Any?, contentDescription: String?, modifier: Modifier = Modifier, imageLoader: ImageLoader = SingletonImageLoader.get(LocalPlatformContext.current), alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality, animate: Boolean = true, placeholder: Painter? = null, error: Painter? = null, onSuccess: (SuccessResult) -> Unit? = null, onError: (ErrorResult) -> Unit? = null)

AsyncImage, but animations actually play: on every target.

Link copied to clipboard
fun ImageRequest.Builder.maxFrames(maxFrames: Int): ImageRequest.Builder

Decode at most maxFrames frames of an animated image, as ImageKodec.decodeAnimation does with the same argument. 1 suits a thumbnail or a paused image: KiteImageDecoder then decodes and downscales one frame instead of every frame, and returns it as a still image. KiteAsyncImage sets it to 1 while animate is false.