Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

MediaMetadataRetriever.BitmapParams

public static final class MediaMetadataRetriever.BitmapParams
extends Object

java.lang.Object
   ↳ android.media.MediaMetadataRetriever.BitmapParams


Summary

Public constructors

MediaMetadataRetriever.BitmapParams()

Create a default BitmapParams object.

Public methods

Bitmap.Config getActualConfig()

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

Bitmap.Config getPreferredConfig()

Retrieve the preferred bitmap config in the params.

void setPreferredConfig(Bitmap.Config config)

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

Inherited methods

Public constructors

MediaMetadataRetriever.BitmapParams

added in API level 28
public MediaMetadataRetriever.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
public Bitmap.Config getActualConfig ()

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

Returns
Bitmap.Config the actual bitmap config used.

This value will never be null.

getPreferredConfig

added in API level 28
public Bitmap.Config getPreferredConfig ()

Retrieve the preferred bitmap config in the params.

Returns
Bitmap.Config the preferred bitmap config.

This value will never be null.

setPreferredConfig

added in API level 28
public void setPreferredConfig (Bitmap.Config config)

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 must never be null.