Package-level declarations

Types

Link copied to clipboard

Loads images from the web at the size they show at, and keeps the latest ones in memory, so what scrolls back into view shows its images at once.

Link copied to clipboard

Marks the parts of the AI SDK its own modules share, such as its renderers of generated UI. They can change or go away in any release: don't use them in an app.

Functions

Link copied to clipboard
fun rememberAIImage(url: String, targetSizePx: Int, maxBytes: Int = AIImageLoader.MaxDownloadBytes): ImageBitmap?

The image at url, sampled down to about targetSizePx, once it has loaded with AIImageLoader; null until then, or when it can't be loaded. Its load stops when this leaves the composition. Previews and snapshots don't load.