maxFrames

fun ImageRequest.Builder.maxFrames(maxFrames: Int): ImageRequest.Builder(source)

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.

It is part of the memory cache key, so a result with fewer frames never answers a request for more. The default, every frame, leaves the key as it was.

Throws


val ImageRequest.maxFrames: Int(source)

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


val Options.maxFrames: Int(source)

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