Package-level declarations

Functions

Link copied to clipboard
@Composable
fun KiteAnimatedImage(animation: KiteAnimation, contentDescription: String?, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality, animate: Boolean = true)

Play an already-decoded KiteAnimation: the one frame loop shared by KiteImage's byte-array overload and imagekodec-coil's KiteAsyncImage. Public because callers running their own decode pipeline deserve playback too, exactly like the KiteImage overload that takes a KiteBitmap.

Link copied to clipboard
@Composable
fun KiteImage(bitmap: KiteBitmap, contentDescription: String?, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality)

Display an already-decoded KiteBitmap (for callers running their own decode pipeline). Conversion to ImageBitmap is remembered per instance and runs on Dispatchers.Default, except for a bitmap of at most 65,536 pixels, which converts at once because that costs less than a frame of nothing. Until a larger one is ready, the composable lays out at the bitmap's size and draws nothing.

@Composable
fun KiteImage(data: ByteArray, contentDescription: String?, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality, animate: Boolean = true, colorTarget: ColorTarget = ColorTarget.Srgb(), onError: (ImageDecodeException) -> Unit? = null)

Display any image ImageKodec can decode: and it decides on its own whether to animate. Feed it a GIF and it plays (correct delays, disposal compositing, NETSCAPE loop count, holding the last frame after a finite loop ends); feed it a PNG/BMP and it just draws. One composable, no format branching at call sites.

Link copied to clipboard
expect fun KiteBitmap.toImageBitmap(): ImageBitmap

Convert a decoded KiteBitmap (non-premultiplied ARGB_8888 in an IntArray) to a Compose ImageBitmap.