Back to Exoplayer

BitmapLoader (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/util/BitmapLoader.html

latest3.4 KB
Original Source

Package com.google.android.exoplayer2.util

Interface BitmapLoader

  • All Known Implementing Classes:DataSourceBitmapLoader

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceBitmapLoader

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Loads images.

Method Summary

All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | ListenableFuture<Bitmap> | decodeBitmap​(byte[] data) | Deprecated.

Decodes an image from compressed binary data. | | ListenableFuture<Bitmap> | loadBitmap​(Uri uri) | Deprecated.

Loads an image from uri. | | default ListenableFuture<Bitmap> | loadBitmapFromMetadata​(MediaMetadata metadata) | Deprecated.

Loads an image from MediaMetadata. |

Method Detail

- 

decodeBitmap

[ListenableFuture](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true "class or interface in com.google.common.util.concurrent")<[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")> decodeBitmap​(byte[] data)

Deprecated.

Decodes an image from compressed binary data.

- 

loadBitmap

[ListenableFuture](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true "class or interface in com.google.common.util.concurrent")<[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")> loadBitmap​([Uri](https://developer.android.com/reference/android/net/Uri.html?is-external=true "class or interface in android.net")uri)

Deprecated.

Loads an image from uri.

- 

loadBitmapFromMetadata

@Nullable
default[ListenableFuture](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true "class or interface in com.google.common.util.concurrent")<[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")> loadBitmapFromMetadata​([MediaMetadata](../MediaMetadata.html "class in com.google.android.exoplayer2")metadata)

Deprecated.

Loads an image from MediaMetadata. Returns null if metadata doesn't contain bitmap information.

By default, the method will try to decode an image from MediaMetadata.artworkData if it is present. Otherwise, the method will try to load an image from MediaMetadata.artworkUri if it is present. The method will return null if neither MediaMetadata.artworkData nor MediaMetadata.artworkUri is present.