BitmapLoader
@UnstableApi
public interface BitmapLoader
BitmapLoader |
This interface is deprecated. Use |
CacheBitmapLoader |
A |
DataSourceBitmapLoader |
A |
SimpleBitmapLoader |
This class is deprecated. Use |
SizeLimitedBitmapLoader |
A |
Loads images.
Summary
Public methods |
|
|---|---|
abstract ListenableFuture<Bitmap> |
decodeBitmap(byte[] data)Decodes an image from compressed binary data. |
abstract ListenableFuture<Bitmap> |
loadBitmap(Uri uri)Loads an image from |
default @Nullable ListenableFuture<Bitmap> |
loadBitmapFromMetadata(MediaMetadata metadata)Loads an image from |
abstract boolean |
supportsMimeType(String mimeType)Returns whether the given |
Public methods
decodeBitmap
abstract ListenableFuture<Bitmap> decodeBitmap(byte[] data)
Decodes an image from compressed binary data.
loadBitmapFromMetadata
default @Nullable ListenableFuture<Bitmap> loadBitmapFromMetadata(MediaMetadata metadata)
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 artworkData if it is present. Otherwise, the method will try to load an image from artworkUri if it is present. The method will return null if neither artworkData nor artworkUri is present.
supportsMimeType
abstract boolean supportsMimeType(String mimeType)
Returns whether the given mimeType is supported.