BlackholeDecoder

class BlackholeDecoder(imageFactory: () -> Image) : Decoder

A Decoder that ignores the SourceFetchResult and always returns the Image returned by imageFactory.

This is useful for skipping the decoding step, for instance when you only want to preload to disk and do not want to decode the image into memory.

Constructors

Link copied to clipboard
constructor(imageFactory: () -> Image)

Types

Link copied to clipboard
class Factory(imageFactory: () -> Image = { EMPTY_IMAGE }) : Decoder.Factory

Functions

Link copied to clipboard
open suspend override fun decode(): DecodeResult

Decode the SourceFetchResult provided by Factory.create or return 'null' to delegate to the next Factory in the component registry.