Added in API level 28

BitmapParams


class BitmapParams
kotlin.Any
   ↳ android.media.MediaMetadataRetriever.BitmapParams

Summary

Public constructors

Create a default BitmapParams object.

Public methods
Bitmap.Config

Get the actual bitmap config used to decode the bitmap after the decoding.

Bitmap.Config

Retrieve the preferred bitmap config in the params.

Unit

Set the preferred bitmap config for the decoder to decode into.

Public constructors

BitmapParams

Added in API level 28
BitmapParams()

Create a default BitmapParams object. By default, it uses Bitmap.Config#ARGB_8888 as the preferred bitmap config.

Public methods

getActualConfig

Added in API level 28
fun getActualConfig(): Bitmap.Config

Get the actual bitmap config used to decode the bitmap after the decoding.

Return
Bitmap.Config the actual bitmap config used. This value cannot be null.

getPreferredConfig

Added in API level 28
fun getPreferredConfig(): Bitmap.Config

Retrieve the preferred bitmap config in the params.

Return
Bitmap.Config the preferred bitmap config. This value cannot be null.

setPreferredConfig

Added in API level 28
fun setPreferredConfig(config: Bitmap.Config): Unit

Set the preferred bitmap config for the decoder to decode into. If not set, or the request cannot be met, the decoder will output in Bitmap.Config#ARGB_8888 config by default. After decode, the actual config used can be retrieved by getActualConfig().

Parameters
config Bitmap.Config: the preferred bitmap config to use. This value cannot be null.