Options

fun Options(context: Context, config: Bitmap.Config, colorSpace: ColorSpace?, scale: Scale, allowInexactSize: Boolean, allowRgb565: Boolean, headers: Headers, parameters: Parameters, memoryCachePolicy: CachePolicy, diskCachePolicy: CachePolicy, networkCachePolicy: CachePolicy)
fun Options(context: Context, config: Bitmap.Config = Bitmap.Config.ARGB_8888, colorSpace: ColorSpace? = NULL_COLOR_SPACE, scale: Scale = Scale.FIT, allowInexactSize: Boolean = false, allowRgb565: Boolean = false, premultipliedAlpha: Boolean = true, headers: Headers = EMPTY_HEADERS, parameters: Parameters = Parameters.EMPTY, memoryCachePolicy: CachePolicy = CachePolicy.ENABLED, diskCachePolicy: CachePolicy = CachePolicy.ENABLED, networkCachePolicy: CachePolicy = CachePolicy.ENABLED)

Parameters

context

The Context used to execute this request.

config

The requested config for any Bitmaps.

colorSpace

The preferred color space for any Bitmaps. If null, components should typically default to ColorSpace.Rgb.

scale

The scaling algorithm for how to fit the source image's dimensions into the target's dimensions.

allowInexactSize

True if the output image does not need to fit/fill the target's dimensions exactly. For instance, if true BitmapFactoryDecoder will not decode an image at a larger size than its source dimensions as an optimization.

allowRgb565

True if a component is allowed to use Bitmap.Config.RGB_565 as an optimization. As RGB_565 does not have an alpha channel, components should only use RGB_565 if the image is guaranteed to not use alpha.

premultipliedAlpha

True if the color (RGB) channels of the decoded image should be pre-multiplied by the alpha channel. The default behavior is to enable pre-multiplication but in some environments it can be necessary to disable this feature to leave the source pixels unmodified.

headers

The header fields to use for any network requests.

parameters

A map of custom parameters. These are used to pass custom data to a component.

memoryCachePolicy

Determines if this request is allowed to read/write from/to memory.

diskCachePolicy

Determines if this request is allowed to read/write from/to disk.

networkCachePolicy

Determines if this request is allowed to read from the network.